What is Class in Java ?

What is Class in Java ?

In Java, Class is a user-defined datatype which represent template or blueprint from which Objects are created.

Class comprises of all the things (like: Variables, methods, constructors, blocks, class) which need to create an real-world Object.

Classes are logical structure, Whereas Objects are real-world entity created using class.

Also, Class ( i.e : java.lang.Class ) is a class in java.lang package which have methods to perform operations for Classes.

Ex. Class.forName(String className) is used to load Class At Runtime .

要查看或添加评论,请登录

Ankit Daware的更多文章

  • LIKE Operator in SQL ?

    LIKE Operator in SQL ?

    Like operator is used to compare column values with text patterns. It has 2 wildcard characters % It replaces 0 to any…

  • HOW TO CHANGE DEFAULT DATE FORMAT IN ORACLE SQL DATABASE

    HOW TO CHANGE DEFAULT DATE FORMAT IN ORACLE SQL DATABASE

    Use this query : SYNTAX for Chnaging default date format in SQL : SQL > ALTER Session set nls_date_format = 'dd/mm/yyy'…

  • What Is Database ?

    What Is Database ?

    Database is interrelated data arranged in an organized form. You can understand like complete details about and…

  • Why main() method is always static in Class ?

    Why main() method is always static in Class ?

    The method is because the JVM needs a single entry point to execute the program without creating an instance of the…

  • What is JIT Compiler in Java ?

    What is JIT Compiler in Java ?

    JIT is Compiler works at runtime for improving program execution. Let's look the complete process of execution of java…

  • What is Encapsulation in Java ?

    What is Encapsulation in Java ?

    Encapsulation is a fundamental concept in object-oriented programming (OOP) , That involves bundling the data (fields)…

  • What is Object in Java ?

    What is Object in Java ?

    In simple words : In Java ,Object is memory created inside "Heap Area" for non-static member of a class. In Addition :…

社区洞察

其他会员也浏览了