JAVA- Test Prep- Classes and Methods-1 | Buy Now |
What is the stored in the object obj in following lines of Java code?
box obj;
Explanation: Memory is allocated to an object using new operator. box obj; just declares a reference to object, no memory is allocated to it hence it points to NULL.