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...

Recommended Answers

All 2 Replies

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.