更多"The students of Class 5 ______ a te"的相关试题:
[单项选择]The students of Class 5 ______ a test tomorrow.
A. will have
B. have
C. has
[单项选择]如下代码定义了一个类Test: class Test { private int y; Test (int x) { y:x; } }现在为Test 类生成一个对象,正确的语句是( )。
A. Test t = new Test( );
B. Test t=new Test(10, 20);
C. Test t;
D. Test t=new Test(10);
[单项选择]有如下类定义:
class Test
public:
Test( )a=0;c=0 //①
int f(int
A. constthis->a=a; //②
B. Test::b;; &nbs
[单项选择]阅读下面代码
class Test implements Runnable
public int run( )
int i=0;
while(true)
i++;
System.out.println("i="+i);
上述代码的编译结果是
A. 程序通过编译,并且run()方法可以正常输出递增的i值
B. 程序通过编译,调用run()方法将不显示任何输出
C. 程序不能通过编译,因为while的循环控制条件不能为true
D. 程序不能通过编译,因为run()方法的返回值类型不是void
[单项选择]阅读下面程序
class Test implements Runnable
public static void main(String[] args)
Test t=new Test( );
t.start( ):
public void run( )
下列关于上述程序的叙述正确的是
A. 程序不能通过编译,因为start()方法在Test类中没有定义
B. 程序编译通过,但运行时出错,提示start()方法没有定义
C. 程序不能通过编译,因为run()方法没有定义方法体
D. 程序编译通过,且运行正常
[单项选择]public class Test
public static void main(String args[])
int a=2,b=4,c=6
Strint s="abc";
System.out.print (a/b+s+c);
A. "absac"
B. "242466"
C. "6abc6"
D. "24abc6"
[单项选择]阅读下面程序 public class Test implements Runnable { public static void main(String[] args) { ______ t.start( ); } public void run( ) { System.out.println("Hello!"); } } 程序中下画线处应填入的正确选项是
A. Test t=new Test();
B. Thread t=new Thread();
C. Thread t=new Thread(new Test());
D. Test t=new Thread();
[单项选择]阅读下列代码
public class Test{
public static void main(String args[]){
System.out.println(89>>1);
}
}
其运行结果是【 】
A. 44
B. 45
C. 88
D. 90
[单项选择]阅读下面代码 public class Test implements Runnable { public void run(Thread t) { System.out.println("Running"); } public static void main(String[] args) { Thread tt=new Thread(new Test( )); tt.start( ); } } 代码运行的结果是
A. 将抛出一个异常
B. 没有输出并正常结束
C. 输出“Running”并正常结束
D. 程序第2行将出现一个编译错误
[单项选择]阅读下列代码:
public class Test
public static void main(String args[]
System.out.println(100%3);
System.out.pnntln(100%3.0);
程序运行结果为( )。
A. 1和1
B. 1和1.0
C. 1.0各1
D. 1.0和1.0
[单项选择]阅读下列程序:
public class Test
public static void main (String args[])
int x=3;
for (int i=1;i<=10; i++) x=x+i/4;
System. out. println(x);
程序的输出结果是( )。
A. 12
B. 13
C. 14
D. 15
[单项选择]
阅读下面程序
class Test implements Runnable {
public static void main(String[] args) {
Test t = new Test( );
t.startO;
}
public void run( ){ }
}
下列关于上述程序的叙述正确的是()
A. 程序不能通过编译,因为start()方法在Test类中没有定义
B. 程序编译通过,但运行时出错,提示start()方法没有定义
C. 程序不能通过编译,因为run()方法没有定义方法体
D. 程序编译通过,且运行正常
[单项选择]阅读下列代码
public class Test 2005{
public static void main(String args[]){
System.out.println(~(0xa5)&0xaA) ;
}
}
其运行结果是【 】
A. 0xa5
B. 10
C. 0x50
D. 0xaa