PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
successful_man

PRO192_-_SU_2023_-_Block_5_-_FE_735.webp

20
(Choose 1 answer)
D. Compiler error
}
}
}

class Box
What will be the output of the following Java program?
{
int width;
int height;
int length;
int volume;
public Box(int width, int height, int length){}
void volume(int height, int length, int width)
{
volume = width*height*length;}
A. 25
B. 12
C. 60
class Using
{
public static void main(String args[])
Box obj = new Box(3,4,5);
obj.height = 1;obj.length = 5;
obj.width = 5;
obj.volume(2,2,3);
System.out.println(obj.volume);

Thông tin

Category
PRO192
Thêm bởi
successful_man
Ngày thêm
Lượt xem
2,243
Lượt bình luận
21
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
File size
54.3 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom