0

Hi all,

I came to know that in Java or c++, constructor is executed only after the allocation of space....
Then what does an implicit default constructor(in c++) or default constructor in Java does....?
If we explicitly define our constructor then the initialization will be done according to our needs!
But what does an implicit or default constructor do?
Does it initialize house keeping data which are invisible to the programmer?
Is the actual allocation of space done by new operator or any implicit things....?
Thank you...

3
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by JamesCherrill
0

The official Java documentation is always the definitive place to look. Here's what the Java Language Specification says about how an instance is created and initialised

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.