-
What is the output of this program?
class box_Shape
{
int width;
int height;
int length;
int volume;
void volume(int heigth, int lenght, int width)
{
volume = width*height*length;
}
}
public class Prameterized_method_Example
{
public static void main(String args[])
{
box_Shape obj = new box_Shape();
obj.height = 5;
obj.length = 6;
obj.width = 10;
obj.volume(5,6,10);
System.out.println(obj.volume);
}
}
-
- 100
- 200
- 300
- 400
- 500
Correct Option: C
Output: 300