s2 = s2 + s1;
}
}
下列选项中,程序的运行结果是()
A、ab
B、aqb
C、aqbaq
D、aqaqb
15、下列选项中,属于单例设计模式的类是?()
A、Math
B、Calendar
C、Runtime
D、System
16、请阅读下面的程序片段
int x = 1, y = 1;
if (x++ == 2 & ++y == 2) {
x = 7;
}
System.out.println(\
程序的运行结果是()
A、x=1,y=1
B、x=7,y=1
C、x=7,y=2
D、x=2,y=2
17、下列选项中,哪个可以用来创建对象?()
A、new
B、this
C、super
D、abstract
18、while语句的循环体中不能包含的语句是
A、while语句
B、方法定义语句
C、if语句
D、switch语句
19、若x=6 ,y=5 则表达式int max=x>y?x:y 的结果为()
A、6
B、5
C、true
D、false
20、下列选项中,不属于基本数据类型的是
A、String
B、short
C、boolean
D、char
21、下列选项中,属于布尔常量的是?()
A、198
B、2e3f
C、true
D、null
22、下面选项中,完全面向对象的编程语言是?()
A、C
B、COBOL
C、JAVA
D、FORTRAN
23、阅读下面一段代码
Integer in1 = new Integer(10);
Integer in2 = new Integer(10);
Integer in3 = 10;
Integer in4 = 10;
System.out.print(in1 == in2);
System.out.print(in1 == in3);
System.out.print(in3 == in4);
下列选项中,程序的运行结果是()
A、true true true
B、false false true
C、false false false
D、false true false
24、对于使用多态的应用程序,某个对象的确切类型何时能知道?()
相关推荐: