Defining a class A class is a user-defined data type or group of object with a template or blueprint that serves to define its properties. It is a logical entity. Once a class type has been define, we can create " Variables " which are similar to basic type declaration. In java, variables are termed as instance of class, which actual object. The basic form class defination is as follows: class classname [extends superclassname]{ [fields declaration] [method declaration] } The classname and superclassname are valid java identifiers. The keyword extends indicate that superclassname properties extended into classname. It is a pert of inheritance. (We will discuss inheritance in later part.) Everything inside square brackets is optional that means we can use as per the requirements. For example, class Empty{ } In above example, the Empty class is class name. This class does not have any properties and therefor cannot do anything. A java cla...
A blog about Java basic concept, Java Keywords, Algorithems, Loops, Conditional loops, Data Structure, Java collections, Database, OOPS concepts, Java Interface, Java String, Java Execption handling, Java Networking, Java AWT, Java Swing, Java Applet, Java JDBC, Java Multithreading, Java I/O, Java String, Java conversion, Java date. And we are going to explain every point in deep for better understanding.