Classes and Objects

Classes and Objects


  1.          Java is a pure object oriented language. 
  2.          So java program contains only classes. 
  3.          Each class has its own data items and functions. 
  4.          The data items are called fields and the functions are called methods.
  5.          A class is a user defined data type and it represents the template of the fields and its related methods. 
  6.          Object is a variable of type class and is used to access the class.

No comments:

Post a Comment

Creating Objects

Creating Objects                  Creating objects means to allocate memory space for all the instance variables of the objects. S...