+ 1
Difference between object & constructor storage?
how constructor is different from object incase of memory allocation?
2 Antworten
+ 1
Constructor is only an instruction how to create object it don't allocate more memory than characters written in it. Object is created from constructor's instruction and its all.
- 1
constructors never provide memory in the heap, it is the new keyword that provide memory or create new object dynamically.
Constructors are just used to initialize the object.or provide default values to the instance members