-
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);
}
}
-
- 150
- 100
- 200
- 50
- 250
Correct Option: A
Output: 150