1.

What is the output of this program? class box { int width; int height; int length; int volume; void finalize() { volume = width*height*length; System.out.println(volume); } protected void volume() { volume = width*height*length; System.out.println(volume); } } class Output { public static void main(String args[]) { box obj = new box(); obj.width=5; obj.height=5; obj.length=6; obj.volume(); } }

A. 150
B. 200
C. Run time error
D. Compilation error
Answer» B. 200


Discussion

No Comment Found