1.

What is the output of this program?class box_Shape { int width; int height; int length; int vol; void vol() { vol = height * width * length; } } public class Result { public static void main(String args[]) { box_Shape obj = new box_Shape(); obj.height = 5; obj.length = 10; obj.width = 3; obj.vol(); System.out.println(obj.vol); } }

A. 150
B. 100
C. 200
D. 50
E. 250
Answer» B. 100


Discussion

No Comment Found

Related MCQs