Vidyalelo
Java Programming · Q114

Constructors and Methods

Programming · Java Programming · question 114

Q114

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
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board