I'm not able to understand difference between creating an object and instance of an object.
so when you say creating an object in java, we create it like object_name = new constructor();
so what's happening behind the scenes as well?
I'm not able to understand difference between creating an object and instance of an object.
so when you say creating an object in java, we create it like object_name = new constructor();
so what's happening behind the scenes as well?
As I understand it instances of objects are specific realizations of the class they are created from. When an object is instanced it begins to physically occupy memory of the system. The way I understand it is the class = blueprint of the house and then instanced object = the actual physical house built from it.
I hope this helps I am still quite new to all this also!
To answer your question there is no difference between "creating an object" and "instantiating an object". Both mean one and the same.
it`s not equal, when create an object is new an object(like A), new is an operator,you can not point this object to a veriable; but where intancing an object, you should point this object an varible like this:
Point user = new User();