MCQOPTIONS
Saved Bookmarks
| 1. |
What is the output of this program?class box_Shape { int width; int length; int height; int volume; box_Shape() { width=8; length=3; height=5; } void volume() { volume = width*length*height; } } public class cons_method_Example { public static void main(String args[]) { box_Shape obj = new box_Shape(); obj.volume(); System.out.println(obj.volume); } } |
| A. | 100 |
| B. | 110 |
| C. | 120 |
| D. | 130 |
| E. | 140 |
| Answer» D. 130 | |