The public interface of a class should contain only operations defined on the class. Classes should be the least dependent as possible. A class hierarchy in the inheritance should be drawn based upon their natural relationship and never imposed. The topmost class should be an abstract class or an interface.
Read moreWhat should be a class in Java?
A class definition is a template for objects : it specifies what attributes the objects have and what methods can operate on them. Every object belongs to an object type; that is, it is an instance of a class.
Read more