+ 2

how memory is allocated for reference type in java

13th Nov 2016, 8:37 AM
Yash Rawat
Yash Rawat - avatar
2 Answers
0
I think. memory gets allocated by constructor. A job=new A();..memory got allocated by A()
23rd Nov 2016, 2:52 PM
somnath
somnath - avatar
0
To create space in the memory for the object and inicialize it we use constructors. Constructors are invoked to create objects from the class blueprint.
30th Nov 2016, 8:53 AM
Felipe Cruz
Felipe Cruz - avatar