Class definition
The class definition consists of
- a header line giving the class name, modifiers, possible subclass and interface structure
- declarations (and possibly initializations) of instance variables
- declaration of a constructor method. This method has the same name as the class and does any initialization whenever an instance is created.
- declarations of other methods.to perform operations using the data in the instance variable of the class