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

SCJP Mock Exam 1(5)

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

       

class Foo {
int num;
Baz comp = new Baz();
}
class Bar {
boolean flag;
}
class Baz extends Foo {
Bar thing = new Bar();
double limit;
}

1) A Bar is a Baz.
2) A Foo has a Bar.
3) A Baz is a Foo.
4) A Foo is a Baz.
5) A Baz has a Bar.

Q37
Which statements concerning the value of a member variable are true, when no explicit assignments have been made?

1) The value of an int is undetermined.
2) The value of all numeric types is zero.
3) The compiler may issue an error if the variable is used before it is initialized.
4) The value of a String variable is "" (empty string).
5) The value of all object variables is null.

Q38
Which statements describe guaranteed behavior of the garbage collection and finalization mechanisms?

1) Objects are deleted when they can no longer be accessed through any reference.
2) The finalize() method will eventually be called on every object.
3) The finalize() method will never be called more than once on an object.
4) An object will not be garbage collected as long as it is possible for an active part of the program to access it through a reference.
5) The garbage collector will use a mark and sweep algorithm.

Q39
Which code fragments will succeed in printing the last argument given on the command line to the standard output, and exit gracefully with no output if no arguments are given?

CODE FRAGMENT A:
public static void main(String args[]) {
if (args.length != 0)
System.out.println(args[args.length-1]);
}

CODE FRAGMENT B:
public static void main(String args[]) {
try { System.out.println(args[args.length]); }
catch (ArrayIndexOutOfBoundsException e) {}
}

CODE FRAGMENT C:
public static void main(String args[]) {
int ix = args.length;
String last = args[ix];
if (ix != 0) System.out.println(last);
}

CODE FRAGMENT D:
public static void main(String args[]) {
int ix = args.length-1;
if (ix > 0) System.out.println(args[ix]);
}

CODE FRAGMENT E:
public static void main(String args[]) {
try { System.out.println(args[args.length-1]); }
catch (NullPointerException e) {}
}

1) Code fragment A.
2) Code fragment B.
3) Code fragment C.
4) Code fragment D.
5) Code fragment E.

Q40
Which of these statements concerning the collection interfaces are true?

1) Set extends Collection.
2) All methods defined in Set are also defined in Collection.
3) List extends Collection.
4) All methods defined in List are also defined in Collection.
5) Map extends Collection.

Q41
What is the name of the method that threads can use to pause their execution until signalled to continue by another thread?

Fill in the name of the method (do not include a parameter list).

Q42
Given the following class definitions, which expression identifies whether the object referred to by obj was created by instantiating class B rather than classes A, C and D?

class A {}
class B extends A {}
class C extends B {}
class D extends A {}

1) obj instanceof B
2) obj instanceof A && ! (obj instanceof C)
3) obj instanceof B && ! (obj instanceof C)
4) obj instanceof C obj instanceof D
5) (obj instanceof A) && ! (obj instanceof C) && ! (obj instanceof D)

Q43
What will be written to the standard output when the following program is run?

public class Q8499 {
public static void main(String args[]) {
double d = -2.9;
int i = (int) d;
i *= (int) Math.ceil(d);
i *= (int) Math.abs(d);
System.out.println(i);
}
}

1) 12
2) 18
3) 8
4) 12
5) 27

Q44
What will be written to the standard output when the following program is run?

public class Qcb90 {
int a;
int b;

 

上下文章:

 

上一篇文章: SCJP Mock Exam 1(4) 下一篇文章: SCJP Mock Exam 1(6)

相关文章:

  • 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
  • SCJP考试真题和解析[1](2)
  • Java认证模拟题及分析(3)
  • Java认证模拟题及分析(1)
  • SCJP考试真题和解析[1](1)
  • SCJP模拟试题[2](1)
  • JAVA题库:格林模拟试题一(上)(2)
  • SCJP模拟试题[2](3)

JAVA认证阅读总排行

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

广告位置

字母检索 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 第九软件网 版权所有