In Java, what is the difference between instance of a class and Object of a class.
For a class A, Take a look :
line 1 : A a; // Declaring a reference variable of class A
Line 2 : a = new A();// Instantiating an object of class A ( An object/instance is created
on Right hand side of the equation)
So....can the line 2 also be : // Instantiating an instance of class A
which mean Instance and Object are absolutely the same thing ?
Please give an objective answer than subjective.
.So an instance and object is same ? No difference at all. An object is an instance of the class .... or an Instance is an object of a class....both are same ?