Java认证模考试题(六)

文章作者 100test 发表时间 2007:03:14 17:02:52
来源 100Test.Com百考试题网


Question: 35


In the Test.java source file, which are correct class definitions?


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. public class Test extends T1{

public int x=0.

public Test(int x){

this.x = x.

}

}

E. protected class Test extends T2{

public int x=0.

public Test(int x){

this.x=x.

}

}

Explanation:

In the Test.java source file the class name should be Test, not test, for it is case-sensitive in Java. One class should have not more than one superclass. The protected modifier can not be put in front of the class.

Correct Answer: B,D 35 of 60


相关文章


Java认证模考试题(七)
JAVA基础:Java启动器如何查找类
Java程序设计知识与技能(五)
LineNumberReader提供更好的出错消息
Java认证模考试题(六)
如何从MIDlet中调用JSP页面
Java认证模考试题(五)
Java程序设计知识与技能(六)
利用Java完成域名和IP地址的转换
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛