What a class in Java contains?

A class describes the data and the methods of its objects . Every object belongs to some class. An object contains data (instance variables) representing its state, and instance methods, which are the things it can do. A class may also contain its own data (class variables) and class methods.

Read more