The process of creating objects from a class is called instantiation. An object is an instance of a class. The object is constructed using the class as a blueprint and is a concrete instance of the abstraction that the class represents. An object must be created before it can be used in a program. In Java, objects are manipulated through object references (also called reference values or simply references). The process of creating objects usually involves the following steps:
Declaration of a variable to store the object reference. This involves declaring a reference variable of the appropriate class to store the reference to the object.
// Declaration of two reference variables that will denote // two distinct ...