下列指标,属于成本计划的质量指标是()。
A.项目总成本指标
B.单位工程计划成本指标
C.设计预算成本计划降低额
D.设计预算成本计划降低率
第1题
编译运行以下程序后,关于输出结果的说明正确的是()。 public class Conditional{ public static void main (String args[]){ int x=2: System.out.println("value is”+ ((x<1)?2:2)); } }
A.输出结果为:valueis22.2
B.输出结果为:value is 2
C.输出结果为:value is 2.0
D.编译错误
第2题
以下程序的编译运行结果为:
1: public class Q10
2: {
3: public static void main(String[] args)
4: {
5: int i = 10;
6: int j = 10;
7: boolean b = false;
8:
9: if(b = i == j)
10: System.out.println("True");
11: else
12: System.out.println("False");
13: }
14: }
A. 第9行出现编译错误;
B. 第9行出现运行错误;
C. 输出 True
D. 输出 False
第3题
A.0
B.1
C.2
D.编译错误
第4题
【单选题】若有以下程序:的运行结果: class Array{ public static void main(){ int []a={1,2,4,3}; try{ for(int i=0;i<a.lenth;i++){ int a1="a[i]/a[i+1];}" }catch(airthmeticexception e){system.out.println(“airthmeticexception”);} catch(indexouterofboundsexception ){ system.out.println(“indexouterofboundsexception”);} }} 则程序运行结果为(> A、AirthmeticException
B、IndexOuterOfBoundsException
C、无显示
D、编译错误
第5题
【填空题】读下面程序,写出程序运行结果。 class Point{ int x=1; public void show(){System.out.println(x);}} class SPoint extends Point{ int y=2; public void show(){System.out.println(x+","+y);}} class PPoint extends Point{ int z=3; public void show(){System.out.println(x+","+z);}} public class tempDemo{ public static void main(String []args){ Point p; p=new Point(); p.show(); p=new SPoint(); p.show(); p.x=2; p.show(); p=new PPoint(); p.show(); }} 运行结果为:
第6题
A、编译通过,运行无输出
B、编译通过,运行输出:The age is 1
C、编译通过,但运行时出错
D、不能通过编译
第7题
A.1
B.2
C.-1
D.0
第8题
A.程序的运行结果为输出0
B.程序的运行结果为输出10
C.程序的运行结果为输出20
D.程序不能编译通过
第9题
【分录题】(4-3)写出以下程序运行结果。 public class Demo05 { public static void main(String[] args) { int temp = 0; int[][] arr = { { 3, 4, 5 }, { 7, 8, 2 }, { 1 }, { 6, 2, 8 } }; for (int[] list : arr) for (int x : list) { if(x>3) temp += list.length; } System.out.println(temp); } }
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!