A class is a user defined data type with a template that serves to define its properties.It is a blueprint from which individual objects are created.In java variables are termed as Instances of classes, which are the actual Objects.
The basic form of a class definition is :
class classname [extends superclassname ] { [ fields declaration; ] [ methods declaration; ] }
The keyword extends indicates that the properties of superclassname class are extended to the classname class.
Fields and methods are declared inside the body.