12
13
14
15
第1题:
阅读下列代码 public class Test{ public static void main(String args[]){ System.out.println(89>>1); } } 其运行结果是
A.44
B.45
C.88
D.90
第2题:
( 8 )阅读下列代码
public class Test2{
public static void main(String args[]){
System.out.println(5/2);}}
其执行结果是 【 8 】 。
第3题:
下列代码的执行结果是public class Test{ public int aMethod(){ static int i=0; i++; System.out.println(i); } public static void main(String args[]){ Test test= new Test(); test. aMethod(); }}
A.编译错误
B.0
C.1
D.运行成功,但不输出
第4题:
阅读下列代码: public class Test{ public static void main(String args[])[ System. out.println(89>>1 ); } }
A.44
B.45
C.88
D.90
第5题:
下列语句输出的结果为( )。 public class test { public static void main(String args[]) { byte b=OXA; System.out.println(b); } }
A.OXA
B.A
C.1
D.10
第6题:
下列代码的执行结果是( )。
public class Test{
public int aMethod( ){
static int i=0;
i++;
System.out.println(i):
}
public static void main (String args[]){
Trest test=new Test ( );
test aMethod( ):
}
}
A.编译错误
B.0
C.1
D.运行成功,但不输出
B.
C.
D.
第7题:
A.12
B.012
C.10
D.3
第8题:
A. hello
B. hello2
C. 编译报错
D. 运行报错,不能将串与整数相加
第9题:
执行以下代码,输出结果的结果是? () public class Test{ public String[] ss = new String[5]; public static void main(String[] args){ System.out.println(ss[1]); } }
第10题:
Public class test ( Public static void main (String args[]) ( System.out.printIn (6 ^ 3); ) ) What is the output?()
第11题:
第12题:
null
-1
编译时出错
运行时报错
第13题:
( 22 )阅读下列代码
public class Test{
public static void main(String args[]){
System.out.println(89>>1) ;
}
}
其运行结果是
A ) 44
B ) 45
C ) 88
D ) 90
第14题:
请在下划线处填入代码,是程序正常运行并且输出 “ Hello! ”
Class Test 【 15 】 {
Public static void main (String[] arge){
Test t = new Test();
t.start();
}
Public void run(){
System.out.println( “ Hello! ” );
}
第15题:
下列程序的输出结果是 class Test{ public static void main(String args[]){ int n=7; n<<=3; n=n&n+1|n+2^n+3; n>>=2; System.out.println(n); } }
A.0
B.-1
C.14
D.64
第16题:
下列代码的执行结果是( )。 public,class Test1 { public static void main(String args[]) { System.out.println(5/2); } }
A.2.5
B.2.0
C.2.50
D.2
第17题:
下列语句输出结果为( )。 public class test { public static void main(String args[]) { byte b=011; System.out.prinfin(b); } }
A.B
B.11
C.9
D.011
第18题:
下列程序的输出结果是( )。 public class Test { public static void main (String[] args) { String s="hello"; s.replace ('r','m'); System.out.println(s); } }
A.hello
B.HELLO
C.hemmo
D.HEMMO
第19题:
A. 7
B. 6
C. 5
D. 8
第20题:
执行以下代码会输出什么结果?() public class Test { StringgetStr(String s){ return s + “hello”; } public static void main(String arg[]) { Test t= new Test(); System.out.println(t.getStr(“LiLei/n”)); } }
第21题:
Which declarations will allow a class to be started as a standalone program?()
第22题:
下列代码的输出是()。 public class test{public static void main(String args[]) {System.out.print("IBM/n012/63ABC//".length( ));}}
第23题:
编译报错
LiLei hello
LiLeihello
无任何输出