1.

What is the output of this program?class box_Shape { int w; int h; int l; int vol; void vol() { vol = w * h * l; } void vol(int p) { vol = p; } } public class Result { public static void main(String args[]) { box_Shape bs = new box_Shape(); bs.h = 2; bs.l = 7; bs.w = 6; bs.vol(6); System.out.println(bs.vol); } }

A. 50
B. 5
C. 60
D. 6
E. 16
Answer» E. 16


Discussion

No Comment Found

Related MCQs