• 网络学院
  • IT资讯
  • 操作系统
  • 网络技术
  • 软件应用
  • 办公软件
  • 编程技术
  • 网站架设
  • 数据库类
  • 平面设计
  • 多媒体类
  • 游戏资讯
  • 教学论文
  • 认证考试
格林模拟试题二参考答案(3)
  站点:
  • 首 页
  • 最新软件
  • 文章教程
  • 国内软件
  • 国外软件
  • 绿色软件
  • 源码下载
  • 字体下载
格林模拟试题二参考答案(3)
软件发布 格林模拟试题二参考答案(3)
网络软件 系统工具 应用软件 联络聊天 图形图像 多媒体类 行业软件 游戏娱乐 编程开发 安全相关 教育教学 数码软件 绿软下载
热门软件: QQ 瑞星 pplive e话通 木马克星 千千静听 office2000 五笔字根 Photoshop 视频分割
返回文章教程首页 >> 文章首页 >> 认证考试 >> JAVA认证 >> JAVA题库 >> 格林模拟试题二参考答案(3)

格林模拟试题二参考答案(3)

添加时间: 2007-9-22 6:52:10  作者: JAVA认证考试  阅读次数:48   来源: http://www.d9soft.com

       

Answer 43)

2) Ask for a re-design of the hierarchy with changing the Operating System to a field rather than Class type

This question is about the requirement to understand the difference between the "is-a" and the "has-a" relationship. Where a class is inherited you have to ask if it represents the "is-a" relationship. As the difference between the root and the two children are the operating system you need to ask are Linux and Windows types of computers.The answer is no, they are both types of Operating Systems. So option two represents the best of the options. You might consider having operating system as an interface instead but that is another story.

Of course there are as many ways to design an object hierarchy as ways to pronounce Bjarne Strousjoup, but this is the sort of answer that Sun will proabably be looking for in the exam. Questions have been asked in discussion forums if this type of question really comes up in the exam. I think this is because some other mock exams do not contain any questions like this. I assure you that this type of question can come up in the exam. These types of question are testing your understanding of the difference between the is-a and has-a relationship in class design.

Answer 44)

1) An inner class may be defined as static
4) An inner class may extend another class

A static inner class is also sometimes known as a top level nested class. There is some debate if such a class should be called an inner class. I tend to think it should be on the basis that it is created inside the opening braces of another class. How could a programmer provide a constructor for an anonymous class?. Remember a constructor is a method with no return type and the same name as the class. Inner classes may be defined as private
Answer 45)

4) Compilation and output of "Not equal! 10"

The output will be "Not equal 10".  This illustrates that the Output +=10 calculation was never performed because processing stopped after the first operand was evaluated to be false. If you change the value of b1 to true processing occurs as you would expect and the output is "We are equal 20";.

Answer 46)

2)j= i<<j;4)j=i<<l;

Answer 47)

4) 12

As well as the binary OR objective this questions requires you to understand the octal notation which means that the leading letter zero (not the letter O)) means that the first 1 indicates the number contains one eight and nothing else. Thus this calculation in decimal mean

84To convert this to binary means

10000100----1100----Which is 12 in decimal

The bitwise operator means that for each position where there is a 1, results in a 1 in the same position in the answer.

Answer 48)

2)s+=i;

Only a String acts as if the + operator were overloaded

Answer 49)

Although the objectives do not specifically mention the need to understand the I/O Classes, feedback from people who have taken the exam indicate that you will get questions on this topic. As you will probably need to know this in the real world of Java programming, get familiar with the basics. I have assigned these questions to Objective 10.1 as that is a fairly vague objective.

1) File f = new File("/","autoexec.bat");
2) DataInputStream d = new DataInputStream(System.in);
3) OutputStreamWriter o = new OutputStreamWriter(System.out);

Option 4, with the RandomAccess file will not compile because the constructor must also be passed a mode parameter which must be either "r" or "rw"

Answer 50)

1)o1=o2;2)b=ob;4)o1=b;

Answer 51)

4) 10020

In the call

another(v,i);

A reference to v is passed and thus any changes will be intact after this call.

Answer 52)

1) public void amethod(String s, int i){}
4) public void Amethod(int i, String s) {}

Overloaded methods are differentiated only on the number, type and order of parameters, not on the return type of the method or the names of the parameters.

Answer 53)


4)Base b = new Base(10);

Any call to this or super must be the first line in a constructor. As the method already has a call to this, no more can be inserted.

Answer 54)

1) System.out.println(s);
4) System.out.println(iArgs);

A class within a method can only see final variables of the enclosing method. However it the normal visibility rules apply for variables outside the enclosing method.

Answer 55)

1) yield()
2) sleep
4) stop()

Note, the methods stop and suspend have been deprecated with the Java 2 release, and you may get questions on the exam that expect you to know this. Check out the Java2 Docs for an explanation
Answer 56)

1) addElement

Answer 57)

The import statement allows you to use a class directly instead of fully qualifying it with the full package name, adding more classess with the import statement does not cause a runtime performance overhad. I assure you this is true. An inner class can be defined with the protected modifier, though I am not certain why you would want to do it. An inner class can be defined with the private modifier, try compiling some sample code before emailing me to ask about this.

3)A inner class may under some circumstances be defined with the protected modifier
4) An interface cannot be instantiated

Answer 58)

1) mousePressed(MouseEvent e){}
4) componentAdded(ContainerEvent e){}

Answer 59)

1) iterator
2) isEmpty
3) toArray
Answer 60)

2) Ensures only one thread at a time may access a method or object

End of document

 

上下文章:

 

上一篇文章: 格林模拟试题二参考答案(2) 下一篇文章: 格林模拟试题三参考答案(1)

相关文章:

  • 史上最强的几道oracle面试题
  • 国外公司的Oracle DBA试题
  • 今年4月三级数据库笔试试题及答案
  • Oracle DBA 逻辑备份试题选
  • 国外某公司的Oracle DBA试题

相关软件:

  • 全国计算机等级考试模拟软件(2006年全年使用)二级Visual Basic V9.0
  • 白金模拟炒股平台 V3.6
  • 全国计算机等级考试第21次全真模拟系统 20050311
  • 全国专业技术人员计算机应用能力考试模拟 2.1
  • 中考物理试卷分类试题 4.1
  • 计算机等级考试训练模拟软件(三级网络技术) V1.04

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • ASP源码
  • PHP源码
  • Net源码
  • JSP 源码

JAVA认证分类导航

  • JAVA动态
  • JAVA指导
  • JAVA题库

本类经典文章推荐

  • SCJP模拟试题[2](2)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](2)
  • SCJP Mock Exam 3(1)
  • SCJP考试题310-025[5](1)
  • Java网络编程之URI、URL研究专题一
  • Java认证模拟题及分析(1)
  • SCJP模拟试题[1](3)
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[2](3)

JAVA题库阅读排行

  • SCJP Mock Exam 2(2)
  • JAVA题库:考考你4
  • JAVA题库:考考你2
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[1](2)
  • Java认证模拟题及分析(1)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](1)

JAVA认证阅读总排行

  • SCJP Mock Exam 2(2)
  • JAVA题库:考考你4
  • JAVA题库:考考你2
  • Java认证模拟题及分析(3)
  • SCJP考试真题和解析[1](2)
  • Java认证模拟题及分析(1)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)
  • SCJP模拟试题[2](1)
  • SCJP考试真题和解析[1](1)

广告位置

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部

关于我们 | 版权声明 | 免责条款 | 广告联系 | 软件发布 | 下载帮助 | 下载排行 | 网站地图 | 特别鸣谢 | 友情连接

copyright; 2005-2008 D9soft.com 第九软件网 版权所有