-
Instance of Object
When an object is created where does it get stored heap or memory?
if objects are not created but instances are created how much memory is allocated? and can we create instance of an object without creating objects?
[B]Question asked by visitor sneha[/b]
-
Re: Instance of Object
Hi,
Objects are always getting created in Heap.
Object class has got a public constructor. So you can create an object of Object class.
Object o = new Object();
-
Re: Instance of Object
hmmm .. instances and objects are actully one and the same thing..
and yeah they are created in the heap , how much size is allocated it doest matter as you cant' control it ..