【C12】
A.certificate
B.check
C.proof
D.providence
A.certificate
B.check
C.proof
D.providence
第1题
下列关于Test类的定义中,正确的是()。
A.class Test implements Runnable{ public void run{} Dublic void someMethod[]{} }
B.class Test implements Runnable(puIblic void run; }
C.class Test implements Runnable(Dublic void someMethod[]; }
D.class Test implements Runnable(public void someMethod{} }
第2题
下列关于Test类的定义中,正确的是()。
A.class Test implements Runnable{ public void run{} Dublic void someMethod[]{} }
B.class Test implements Runnable(puIblic void run; }
C.class Test implements Runnable(Dublic void someMethod[]; }
D.class Test implements Runnable(public void someMethod{} }
第3题
阅读下面程序 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.程序编译通过,且运行正常
第4题
阅读下面程序
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) 程序编译通过,且运行正常
第5题
阅读下面程序 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.程序编译通过,且运行正常
第6题
阅读下面程序 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.程序编译通过,且运行正常
第7题
在下列源代码文件Test.java中, ()是正确的类定义。
A.public class test{
B.public class Test{ public int x=0;public int x=0; public test (intx) public Test (int x){ {this.x=x; this.x=x;} }} }
C.public class Test extends T1,T2{
D.protected class Test extends T2{ public int=0;public int x=0; public Test(int x){Public Test (int x){ this.x=x;this.x=x: }} }}
第8题
A..test{color:red;}
B.#test{color:red;}
C.test{color:red;}
D.,test{color:red;}
第9题
在下列源代码文件Test.java中,哪个选项是正确的类定义?
A.public class test{ public int x=0; public test(int x ) { this.x=x; } }
B.public class Test { public int x=0; public Test(int x ) { this.x=x; } }
C.public class Test extends T1 T2 { public int x=0; public Test(int x){ this.x=x; } }
D.protected class Test extends T2 { public int x=0; public Test(int x) { this.x=x; } }
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!