【单选题】【消耗次数:1】
System.out.println(5 + 2);的输出结果应该是( )。
52
7
2
5
参考答案:
复制
纠错
相关题目
【单选题】 以下程序的运行结果是:( ) public class Increment{ public static void main(String args[]){ int c; c = 2; System.out.println(@@; System.out.println(c++); System.out.println(@@; } }
①  2 2 2
②  2 3 3
③  2 2 3
④  3 4 4
【单选题】 阅读以下代码: import java.io.*; import java.util.*; public class foo{ public static void main (String[] args){ String s; System.out.println(s= + s); } } 输出结果应该是:( )
①  代码得到编译,并输出“s=”
②  代码得到编译,并输出“s=null”
③  由于String s没有初始化,代码不能编译通过
④  代码得到编译,但捕获到 NullPointException异常
【单选题】 下列程序的运行结果是( ) 。 public class X5_1_2 extends x{ int ab() { static int aa=10; aa++; System.out.println(aa); } public static void main(String[] args) { X5_1_2 x=new X5_1_2(); x.ab(); } }
①  10
②  11
③  编译错误
④  运行成功,但不输出
【单选题】 下列程序执行的结果是( ) 。 public class X7_1_6 { public static void main(String[] args) { try{ return; } finally{ System.out.println(Finally); } } }
①  程序正常运行,但不输出任何结果
②  程序正常运行,并输出 Finally
③  编译通过,但运行时出现异常
④  因为没有 catch 子句,因此不能通过编译
【单选题】 编译运行以下程序后,关于输出结果的说明正确的是 ( ) public class Conditional{ public static void main(String args[ ]){ int x=4; System.out.println(“value is “+ ((x>4) ? 9.9:9)); } }
①  输出结果为:value is 99.9
②  输出结果为:value is 9
③  输出结果为:value is 9.0
④  编译错误
【单选题】 关于以下application的说明,正确的是( ) 1. class StaticStuff 2. { 3. static int x=10; 4. static { x+=5;} 5. public static void main(String args[ ]) 6. { 7. System.out.println(“x=” + x); 8. } 9. static { x/=3;} 10. }
①  4行与9行不能通过编译,因为缺少方法名和返回类型
②  9行不能通过编译,因为只能有一个静态初始化器
③  编译通过,执行结果为:x=5
④  编译通过,执行结果为:x=3
【单选题】 下面代码运行后的输出结果为( ) 。 public class X6_1_5 { public static void main(String[] args) { AB aa = new AB(); AB bb; bb = aa; System.out.println(b@@equals(aa)); } } class AB{ int x = 100; }
①  true
②  false
③  编译错误
④  100
【单选题】 关于以下程序代码的说明正确的是( ) 1.class HasStatic{ 2. private static int x=100; 3. public static void main(String args[ ]){ 4. HasStatic hs1=new HasStatic( ); 5. hs1.x++; 6. HasStatic hs2=new HasStatic( ); 7. hs2.x++; 8. hs1=new HasStatic( ); 9. hs1.x++; 10. HasStati@@x- -; 11. System.out.println(“x=”+x); 12. } 13. }
①  5行不能通过编译,因为引用了私有静态变量
②  10行不能通过编译,因为x是私有静态变量
③  程序通过编译,输出结果为:x=103
④  程序通过编译,输出结果为:x=102
【单选题】 有以下程序,执行后输出结果是() main( ) { int m[][3]={1,4,7,2,5,8,3,6,9}; int i,j,k=2; for(i=0;i { printf(%d ,m[k][i]); } }
①  4 5 6
②  2 5 8
③  3 6 9
④  7 8 9
【单选题】 分析下面的JavaScript代码段,输出的结果是()。 emp=new Array(5); emp[1]=1; emp[2]=2; document.write(emp.length);
①  2
②  3
③  4
④  5
随机题目
【多选题】 49.康德把艺术分为三类,即?
①  摹仿的艺术
②  语言的艺术
③  造型的艺术
④  感觉游戏的艺术
【多选题】 75.审美感知的特点是?
①  直觉性
②  选择性
③  整体性
④  整体建构性
【多选题】 58.清人姚鼐把文章的美分为?
①  优美
②  崇高
③  阴柔之美
④  阳刚之美
【多选题】 96.人的感觉不仅指五官感觉,还包括?
①  精神感觉
②  思想感觉
③  心里感觉
④  实践感觉
【判断题】 153.美感是直观感受,是感性认识。
①  正确
②  错误
【判断题】 150.美感是一种非概念、非逻辑的直觉感受。
①  正确
②  错误
【判断题】 84.崇高就是中国古典美学中所说的壮美或阳刚之美。
①  正确
②  错误
【判断题】 37.节奏美随着社会的发展和历史的前进在变化着。
①  正确
②  错误
【判断题】 120.自然美的审美标准各时代、民族、阶级有明显的差别。
①  正确
②  错误
【判断题】 147.精神人格层次的审美愉悦是美感的最高境界。
①  正确
②  错误