Q76
What will be the output of the following Java code? 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
AnswerB.
200
C.
Run time error
D.
Compilation error
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board