动态网站制作指南
[  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 认证考试 > Java认证
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Java认证 ]的信息

本月文章推荐
.Sun Java认证问答.
.Java认证心得:顺利通过SCJP测试.
.SCJP认证套题解析之四.
.Java语言入门(1).
.通向程序员的选择-SCJP认证.
.Java学习路径-方法篇+资源篇.
.Java语言的12大特色介绍.
.课程介绍(11)SL-351 Java数据库应.
.“编程美女”记:立志向编程牛人学.
.构架Linux环境下Java开发环境(2).
.课程介绍(2)SL-210 向Java面向对.
.Java理论与实践:垃圾收集简史.
.课程介绍(9)SL-310 超越CGI 开发.
.热门问题:java.exe出错错误分析.
.Java认证介绍.
.Test of the Java Skill(3).
.该学Java或.NET?.
.课程介绍(3)SL-265 结构化程序员.
.SCJP认证套题解析之九.
.学习Java的30个基本概念.

Java程序员认证模拟题及详细分析(4)

文章类别:Java认证 | 发表日期:2006-4-7 |


续:Java程序员认证模拟题及详细分析(1) 和(2) (3)
   66. Given the following class outline:
   class Example{
   private int x;
   // rest of class body
   public static void main(String args[]){
   //implementation of main mehtod}
   }
   Which statement is true?
   A. x=2 is a valid assignment in the main() method of class Example.
   B. Changing private int x to int x would make x=2 a valid assignment in the main() method of class Example.
   C. Changing private int x to public int x would make x=2 a valid assignment in the main() method of class Example.
   D. Changing private int x to static int x would make x=2 a valid assignment in  the main() method of class Example.
   E. Changing class Example to public class Example would make x=2 a valid assignment in the main() method of class Example.

   67. Which statement is true about an inner class?
   A. It must be anonymous
   B. It can not implement an interface
   C. It is only accessible in the enclosing class
   D. It can access any final variables in any enclosing scope.

   68. Which statement is true about the grid bag layout manager?
   A. The number of rows and columns is fixed when the container is created.
   B. The number of rows and columns is fixed when the GridBagLayout object is created.
   C. If a component has a fill value of BOTH, then as the container change size, the component is resized.
D. Every component must carry a non-zero weightx and weighty value when it is added to the container
   E. If a row has a weighty value that is non-zero, then as the container changes height, the row changes height.

   69. Which statement are true about writing a class that is to handle the events issued by a user interface component.
   A. Subclassing an adapter is inappropriate in this case.
   B. The class should implement some listener interface
   C. A class can implement multiple listener interfaces if desired.
   D. A subclass of an AWT component cannot listen to its own events.
   E. When implements listener interface, a class need only provide those handler methods that it chooses.

   70.The argument for a class?s main() method is called args, and the class is invoked as follows.
java Example cat
   What would be the effect of trying to access args[0] in the main method?
   A. The value produced is cat
   B. The value produced is java
   C. The value produced is Example
   D. An object of type NullPointerException is thrown.
   E. An object of type ArrayIndexOutofBoundsException is thrown.
   71. Which best describes the requirements of a fully encapsulated class?
   A. Mehtods must not be private.
   B. Variables must not be public.
   C. The class must be marked final
   D. Public methods are all marked final.
   E. Modification of the objects state is only possible using method calls.

   72.Which contains objects without ordering, duplication, or any particular lookup/retrieval mechanism?
   A. Map
   B. Set
   C. List
   D. Collection
   E. Enumeration

   73.What might cause the current thread to stop executing?
   A. An interrupted exception is thrown.
   B. The thread execute a sleep() call.
   C. The thread constructs a new thread
   D. A thread of higher priority becomes ready
   E. The thread executes a read() call on InputStream

   74.Which statements are true about threads?
   A. Threads created from the same class all finish together.
   B. A thread can be created only by subclassing java.lang.Thread.
   C. Invoking the suspend() method stops a thread so that it cannot be restarted.
   D. The Java interpreter?s natural exit occurs when no non-daemon threads remain alive.
   E. Uncoordinated changes to shared data by multiple threads may result in the data being read, or left, in an inconsistent state.

   75.What might form part of a correct inner class declaration or combined declaration and instantiation?
   A. private class C
   B. new SimpleInterface(){
   C. new ComplexInterface(x){
   D. private final abstract class(
   E. new ComplexClass() implements SimpleInterface
   76. Which statements are true about the garbage collection mechanisms?
   A. The garbage collection mechanism release memory at pridictable times.
   B. A correct program must not depend upon the timing or order of garbage collection
   C. Garbage collection ensures that a program will NOT run out of memory during execution
   D. The programmer can indicate that a reference through a local variable is no longer going to be used.
   E. The programmer has a mechanism that explicitly and immediately frees the memory used by Java objects.

====================================================

答案及详细分析:

66.D
main()方法是静态方法,静态方法不能直接访问非静态成员。
67.D
此题考察学生对内部类属性的掌握情况。内部类可以实现接口;匿名类是内部类的一种;内部类通过各种方式可以在包含它的类的外部被访问到;内部类被定义在块中时,只能访问包含它的块的final类型变量。故选择D。
68.C
此题考察考生对类GridBagLayout、及类GridBagConstraints的掌握情况,请考生查阅API文档。
69.B、C
此题考察考生对事件处理的理解。D选项是错的,因为控件可以监听自己的事件。另外,当实现一个接口时,必须实现它内部的所有的方法,所以E选项也是错的。
70.A
命令行参数是紧跟在类名后面的。所以本题中参数由“cat”提供。
71.E
在完全封装类中,一般的定义方式是将所有的成员变量定义为“private”,而将访问这些变量的方法定义为非“private”类型,这样可以在类的外部间接地访问这些变量。所以E选项是最符合这个意思的。
72.B
此题考察“Collection API”的一些知识。实现接口“Set”的类内部所存储的对象是没有顺序,但是允许重复的。另请注意其它几个接口的特征。
73.A、B、D、E
当新线程被创建时,只是使它变为可运行状态而已,并不能使当前线程停止执行。当调用read()方法时,它与输入输出打交道,可能造成线程的暂停执行。
74.D、E
程序的执行完毕是以用户线程(user threads)的结束而标志结束的,与超级线程(daemon threads)无关。所以D选项是对的。E选项说明的是当不同线程对相同数据进行访问时,可能造成数据毁损。
75.A、B
76.B、D
程序的代码是无法对垃圾回收进行精确控制的,程序代码与垃圾回收是相互独立的系统,并不互相影响。答案D告诉我们程序员可以使一个本地变量失去任何意义,例如给本地变量赋值为“null”;

上一篇:Java程序员认证模拟题及详细分析(3) 人气:5030
下一篇:在Java中读写Excel文件 人气:3431
点击此处浏览全部Java认证的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-5-16 乘风多用户PHP统计系统 v3.4
2008-5-16 轩溪下载系统 v3.78 build 0515
2008-5-16 普沙B2B 浙江省商贸网 v2.0
2008-5-16 asp抓蜘蛛的小程序 v1.0
2008-5-16 齐齐乐网私服发布站 仿haosf新版
2008-5-16 IssTech信息反馈系统 v1.0
2008-5-16 自由领域大头贴(js接口版) 修正版
2008-5-16 医院网站系统
2008-5-16 智拓-分类信息管理系统 v5.0
2008-5-7 Windows XP SP3 官方英文版
2008-5-7 Windows XP SP3 官方香港中文版
2008-5-7 Windows XP SP3 官方繁体中文版
2008-5-7 Windows XP SP3 官方简体中文版
2008-4-30 Multiple Unzip Wizard 1.02
2008-4-30 Multiple Unrar Wizard 1.0.0
2008-4-30 WinZip Install/Try/Uninstall a
2008-4-30 ZIP压缩文件修复器WzipFix 2.0
2008-4-30 Pentazip 6.01 Build 189 For Wi
  发表评论
姓 名: 验证码: [ 全部贴吧 ] [ 浏览评论 ]
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報