下面程序的输出结果是()。 #include<iostream> Usingnamespacestd; ClassBase{ public:
A.0
B.1
C.01
D.001
A.0
B.1
C.01
D.001
B、1□□□2□□□3□□□4□□□
C、□□□1 □□□2 □□□3 □□□4
D、1□□□ 2□□□ 3□□□ 4□□□
下列程序的输出结果为 class Box{ int length,width,height; public void setInfo(int l,int w,int h){ length = l; width = w; height = h; } public int volumn(){ return length*width*height; } public int area(){ return (length*width + length*height + width*height) * 2; } public String toString(){ return "Length:" + length + " width:" + width + " height:" + height + " volumn: " + volumn() + " area:" + area(); } } public class BoxTest { public static void main(String[] args) { Box b = new Box(); b.setInfo(5,2,4); System.out.println(b.toString()); } }
A、World Hello
B、oWorld HelloW
C、World World
D、oWorld Hello
A.4
B.17
C.18
D.0.25
A、程序将输出第15行的异常信息
B、程序第10行出错
C、程序将输出“b=42”
D、程序将输出第19行的异常信息
B、985
C、494
D、495
B、IndexOuterOfBoundsException
C、无显示
D、编译错误
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!