Sunday 23 October 2016


  • A class is a group of objects that have common property.
  • A class is a model for creating objects, it does not exist physically
  • A class is a simple discussion between properties and actions of objects.
  • We can develop class by using class keyword
100% fact 
  • If any Java programmer wants to develop any java program, then he should start with class only.
  • Cool warning : no other option.
        class classname
              type of variables;

              typeof method1()
                   body of method1;
class contains mainly two parts : Variables and methods.
  • Variables tells us what type of data it is.
  • We can say variables declaration as data members or properties.
  • Method definitions tells us what type of operations will be performed
  • Based on requirement class may contains constructors and blocks also.
  • We will learn about constructors and blocks in upcoming chapter.
so, a class may contain
  1. Data members
  2. Methods
  3. Constructors
  4. Blocks
Thanks for your time.