x
x=x
“x=”+5
编译报错
第1题:
阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println(~(0xa5)&0xa
A.0xa5
B.10
C.0x50
D.0xaa
第2题:
阅读下列代码 public class Test{ public static void main(String args[]){ System.out.println(89>>1); } } 其运行结果是
A.44
B.45
C.88
D.90
第3题:
( 21 )阅读下列代码
public class Test2005{
public static void main(String args[]){
System.out.println((3>2) ? 4 : 5) ;
}
}
其运行结果是
A ) 2
B ) 3
C ) 4
D ) 5
第4题:
( 8 )阅读下列代码
public class Test2{
public static void main(String args[]){
System.out.println(5/2);}}
其执行结果是 【 8 】 。
第5题:
A.t.f
B.this.n
C.Test.m
D.Test.n
第6题:
下列代码的执行结果是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.运行成功,但不输出
第7题:
阅读下面代码: public class Test2005 { public static void main(String args[]) { System.out.println((3>2)? 4:5); } } 其运行结果是
A.2
B.3
C.4
D.5
第8题:
下列代码的执行结果是( )。
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.
第9题:
A.12
B.012
C.10
D.3
第10题:
执行以下代码会输出什么结果?() 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”)); } }
第11题:
Which declarations will allow a class to be started as a standalone program?()
第12题:
第13题:
阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println((3>2)?4:5); } } 其运行结果是
A.2
B.3
C.4
D.5
第14题:
阅读下列代码 public class Test{ String s="One World One Dream"; public static void main(String args[]){ System. out. println(s); } } 其运行结果是
A.args
B.One World One Dream
C.s
D.编译时出错
第15题:
( 22 )阅读下列代码
public class Test{
public static void main(String args[]){
System.out.println(89>>1) ;
}
}
其运行结果是
A ) 44
B ) 45
C ) 88
D ) 90
第16题:
请在下划线处填入代码,是程序正常运行并且输出 “ Hello! ”
Class Test 【 15 】 {
Public static void main (String[] arge){
Test t = new Test();
t.start();
}
Public void run(){
System.out.println( “ Hello! ” );
}
第17题:
如下两个源程序文件,分别编译后,运行Example.class文件,运行结果为______。
AB.java文件代码如下;
package test;
public class AB
{
int a=60;
public void show()
{
System.out.println(”a=”+a);
}
Example.java文件代码如下:
import test.AB;
class Example
{
public static void main(String args[])
{
AB bj=new AB();
obj.show();
}
}
第18题:
阅读下面代码 public class Test { String s="One World One Dream"; public static void main(String[] args) { System.out.println(s); } } 其运行的结果是
A.args
B.World One Dream
C.s
D.编译时出错
第19题:
阅读下列代码 public class Test2005 { public static void main(String args[]){ System.out.pfintln(~(0xa5)&0xaa); } } 其运行结果是( )。
A.0xa5
B.10
C.0x50
D.0xaa
第20题:
A.跳出循环,无输出
B.0121
C.01
D.0123
第21题:
A. 7
B. 6
C. 5
D. 8
第22题:
阅读以下代码: public class Test{ public static void main(){ System.out.println(“x=”+x); } } 请问,代码运行的结果是?()
第23题:
Public class test ( Public static void main (String args[]) ( System.out.printIn (6 ^ 3); ) ) What is the output?()
第24题:
x
x=x
“x=”+5
编译报错