1.

What are we only create an object but don’t call any constructor for it in java?(a) Implicit constructor will be called(b) Object is initialized to some null values(c) Object is not created(d) Object is created but points to nullThe question was asked in quiz.My query is from Overloading Constructors in section Constructors and Destructors of Object Oriented Programming

Answer»

Correct choice is (d) Object is created but POINTS to null

The best explanation: The object becomes a REFERENCE object which can be initialized will ANOTHER object. Then this object will indirectly become another name of the object being ASSIGNED. If not assigned, it simply points to null address.



Discussion

No Comment Found

Related InterviewSolutions