A class is a template for an object, and an object is an instance of a class. Once a class is defined, this new type can be used to create objects of that type. The class is at the core of Java.
Java allows objects to initialize themselves when they are created. This automatic initialization is performed through the use of a constructor. This fulfills the requirement for initialization of object upon creation.
Method overloading is one of the ways that Java supports polymorphism.
String class represents character strings. All string literals in Java programs, such as
"abc", are implemented as instances of this class.
The classes defined within another class are known as nested classes. The scope of a nested class is bounded by the scope of its enclosing class. Thus, if class B is defined within class A, then B does not exist independently of A.
When a class is derived from a base class, the derived class inherits all the characteristics of base class and can add new features as refinements and improvements. This is called inheritance.