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

SCJP Mock Exam 3(3)

添加时间: 2007-9-23 2:11:20  作者: JAVA题库  阅读次数:54   来源: http://www.d9soft.com

       

Question 52)
Given the following class definition, which of the following methods could be
legally placed after the comment//Here
public class Rid{
public void amethod(int i, String s){}
//Here
}
1)public void amethod(String s, int i){}2)public int amethod(int i,
String s){} 3)public void amethod(int i, String mystring){} 4) public
void Amethod(int i, String s) {}
Answer
to Question 52)
--------------------------------------
Question 53)
Given the following class definition which of the following can be legally
placed after the comment line//Here ?class Base{
public Base(int i){}
}

 

public class MyOver extends Base{
public static void main(String arg[]){
MyOver m = new MyOver(10);
}
MyOver(int i){
super(i);
}

MyOver(String s, int i){
this(i);
//Here
}
}
1)MyOver m = new MyOver();2)super(); 3)this("Hello",10);4)Base b
= new Base(10);
Answer
to Question 53)
-----------------------------------------
Question 54)
Given the following class definition, which of the following statements would
be legal after the comment //Hereclass InOut{

String s= new String("Between");
public void amethod(final int iArgs){
int iam;
class Bicycle{
public void sayHello(){
//Here
}//End of bicycle class
}
}//End of amethod
public void another(){
int iOther;
}

}
1)System.out.println(s); 2) System.out.println(iOther);3)
System.out.println(iam);4) System.out.println(iArgs);
Answer
to Question 54)
------------------------------------------

Question 55)
Which of the following are methods of the Thread class?
1) yield()2) sleep(long msec)3) go()4) stop()
Answer
to Question 55)
-----------------------------------------

Question 56)
Which of the following methods are members of the Vector class and allow you
to input a new element
1) addElement2) insert3) append4) addItem
Answer
to Question 56)
---------------------------------------------
Question 57)
Which of the following statements are true?
1) Adding more classes via import statements will cause a performance
overhead, only import classes you actually use.2) Under no circumstances can
a class be defined with the private modifier3) A inner class may
under some circumstances be defined with the protected modifier4) An
interface cannot be instantiated
Answer
57)
------------------------------------
Question 58)
Which of the following are correct event handling methods
1) mousePressed(MouseEvent e){}2) MousePressed(MouseClick e){}3)
functionKey(KeyPress k){}4) componentAdded(ContainerEvent e){}
Answer
58)
----------------------------------------

Question 59)
Which of the following are methods of the Collection interface?1)
iterator2) isEmpty3) toArray4) setText
Answer
59)
----------------------------------

Question 60)
Which of the following best describes the use of the synhronized keyword?
1) Allows two process to run in paralell but to communicate with each
other2) Ensures only one thread at a time may access a method or
object3) Ensures that two or more processes will start and end at the same
time4) Ensures that two or more Threads will start and end at the same
time
Answer
60)
--------------------------------

Answers
------------------

Answer 1)
Objective 1.2)
1) The code will compile and run, printing out the words "My Func"

A class that contains an abstract method must be declared abstract itself,
but may contain non abstract methods.
----------------------------------------

Answer 2)
Objective 4.1)
4) The code will compile but will complain at run time that main is not
correctly defined
In this example the parameter is a string not a string array as needed for
the correct main method
------------------------------------

Answer 3)
Objective 4.3)
1) public2) private4) transient
The keyword transient is easy to forget as is not frequently used. Although a
method may be considered to be friendly like in C++ it is not a Java
keyword.
-------------------------------------

Answer 4)
Objective 1.2)
2) The compiler will complain that the Base class is not declared as
abstract.
If a class contains abstract methods it must itself be declared as
abstract
---------------------------------------

Answer 5)
Objective 1.2)
1) To get to access hardware that Java does not know about3) To write
optimised code for performance in a language such as C/C++
------------------------------------

Answer 6)
Objective 1.2)
4) Success in compilation and output of "amethod" at run time.
A final method cannot be ovverriden in a sub class, but apart from that it
does not cause any other restrictions.
----------------------------------

Answer 7)
Objective 1.2)
4) Compilation and execution without error
It would cause a run time error if you had a call to amethod though.
----------------------------------------

Answer 8)
Objective 1.2)
1)Compile time error: Base cannot be private
A top leve (non nested) class cannot be private.
-----------------------------------------

Answer 9)
Objective 1.2)
4) P1 compiles cleanly but P2 has an error at compile time
The package statement in P1.java is the equivalent of placing the file in a
different directory to the file P2.java and thus when the compiler tries to
compile P2 an error occurs indicating that superclass P1 cannot be found.
---------------------------------------
Answer 10)
Objective 1.1)
2) An error at run time
This code will compile, but at run-time you will get an ArrayIndexOutOfBounds
exception. This becuase counting in Java starts from 0 and so the 5th element of
this array would be i[4].
Remember that arrays will always be initialized to default values wherever
they are created.
-------------------------------------

Answer 11)
Objective 1.1)
2)myarray.length;
The String class has a length() method to return the number of characters. I
have sometimes become confused between the two.
------------------------------------

Answer 12)
Objective 8.2)
3) A Frame with one large button marked Four in the Centre
The default layout manager for a Frame is the BorderLayout manager. This
Layout manager defaults to placing components in the centre if no constraint is
passed with the call to the add method.
-----------------------------------

Answer 13)
Objective 8.2)
4) Do nothing, the FlowLayout will position the component
---------------------------------

Answer 14)

method.
--------------------------------------
Answer 55)
Objective 7.2)
1) yield()2) sleep4) 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)
Objective 10.1)
1) addElement
---------------------------------
Answer 57)
Objective 4.1)
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 private modifier.
3) An inner class can be defined with the protected modifier4) An
interface cannot be instantiated
----------------------------------

Answer 58)
Objective 4.6)
1) mousePressed(MouseEvent e){}4) componentAdded(ContainerEvent e){}
-----------------------------------
Answer 59)
Objective 10.1)
1) iterator2) isEmpty3) toArray
-------------------------------------------
Answer 60)
Objective 7.3)
2) 2) Ensures only one thread at a time may access a method or object
---------------------------------------

End of documentMarcus Green copyright 2000

 

上下文章:

 

上一篇文章: SCJP Mock Exam 3(2) 下一篇文章: SCJP认证套题解析卷2

相关文章:

  • Sandy’socp1z0-001Exam
  • SCJP Mock Exam 2(2)
  • SCJP Mock Exam 2(1)
  • SCJP Mock Exam 1(8)
  • SCJP Mock Exam 1(7)

相关软件:

  • ExamDiff Pro V3.3 汉化版
  • ExamDiff V1.6m
  • ExamDiff Pro V3.4 beta 1223
  • Examine32 4.03 汉化版
  • NeoExam考试系统 大众版/ACCESS数据库 1.0.8
  • NeoExam考试系统 VIP版/ACCESS数据库 1.0.8

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • 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 第九软件网 版权所有