Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Question:How many objects are created in the following piece of code?
MyClass c1, c2, c3;
c1 = new MyClass ();
c3 = new MyClass ();
A: ¬†¬†¬†¬†Only 2 objects are created, c1 and c3. The reference c2 is only declared and not initialized.
Sep 13, 2013
Java Interview Questions
Sep 12, 2013
to add a comment.
Related Hot Questions
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please