考试网 >> IT认证 >> JAVA >> JAVA题库 >> 格林模拟试题三参考答案

格林模拟试题三参考答案

发布时间:2006-06-28 10:52     点击:
分页:上一页  1 2 [3] 4 5 6 7 8 9 10  下一页  后10页


Answer to Question 7)

2) Interfaces cannot have constructors

If you try to create a constructor for an Interface the compiler will give you an error message something like

"interface can't have constructors".

4) Interfaces are the Java approach to addressing the single inheritance model, but require implementing classes to create the functionality of the Interfaces.

An interface may contain variables as well as methods. However any variables are final by default and must be assigned values on creation. A class can only extend one other class (single inheritance) but may implement as many interfaces as you like (or is sensible).




Answer to Question 8)

None of these are valid statements. The Math class is final and cannot be extended. The max method takes two parameters, round only takes one parameter and there is no mod parameter. You may get questions in the exam that have no apparently correct answer. If you are absolutely sure this is the case, do not check any of the options.




Answer to Question 9)

1) The Runnable interface has only one method run that needs to be created in any class that implements it. The start method is used to actually call and start the run method executing.


Answer to Question 10)

1) A byte can represent between -128 to 127

The char type is the only unsigned type in Java and thus cannot represent a negative number.

For more information on this topic go to

分页:上一页  1 2 [3] 4 5 6 7 8 9 10  下一页  后10页
版权申明:未经书面授权请勿转载本站信息!!作品版权归所属媒体与作者所有!!
发表评论: 匿名发表 用户名: 查看评论
您将承担一切因您的行为、言论而直接或间接导致的民事或刑事法律责任
留言板管理人员有权保留或删除其管辖留言中的任意内容
本站提醒:不要进行人身攻击。谢谢配合。
在本站搜索相关信息
2003-2005 Ksw123.com All Rights Reserved. - TOP
Copyright © 2006 Ksw123.com. All rights reserved.中国考题网 版权所有