-
What is the output of this program?
class box_Shape
{
int w;
int h;
int l;
int vol;
void vol(int h, int l, int w)
{
vol = w * h * l;
}
}
public class Prameterized_method_Example
{
public static void main(String args[])
{
box_Shape obj = new box_Shape();
obj.h = 6;
obj.l = 3;
obj.w = 4;
obj.vol(6, 3, 4);
System.out.println(obj.vol);
}
}
-
- 68
- 70
- 72
- 74
- 76
Correct Option: C
Output: 72