P

Priyanka Tomar • 35.28K Points
Coach

Q. What will be the output of the following Java program?
class box 
{
     int width;
     int height;
     int length;
} 
 class mainclass 
 {
     public static void main(String args[]) 
     {        
         box obj = new box();
         System.out.println(obj);
     } 
 }

  • (A) 0
  • (B) 1
  • (C) Runtime error
  • (D) classname@hashcode in hexadecimal form
  • Correct Answer - Option(D)
  • Views: 11
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics