预览模式: 普通 | 列表

【TOP】M商城V1.9(增加商品搜索、最新商品功能,修正BUG)

【TOP】Java坦克大战网络对战平台V4.8(完善功能、发布程序) 

【TOP】Java坦克大战图片版V3.6(修正BUG,发布程序)

QUESTION 77:
Exhibit:

*************************
相关代码内详
*************************

Which three code fragments, added individually at line 33, produce the output 100? (Choose three.)

A. n = 100;
B. i.setX(100);
C. o.getY().setX(100);
D. i = new Inner(); i.setX(100);
E. o.setY(i); i = new Inner(); i.setX(100);
F. i = new Inner(); i.setX(100); o.setY(i);

查看更多...

Tags: Java SCJP 310-055 真题解析 基本类型 引用类型 赋值 区别

分类:J2SE | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 546
QUESTION 76:
A class games.cards.Poker is correctly defined in the jar file Poker.jar.
A user wants to execute the main method of Poker on a UNIX system using the command:
Java games.cards.Poker
What allows the user to do this?

A. put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java
B. put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/*.jar
C. put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/Poker.jar
D. put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java
E. put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java/*.jar
F. put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java/Poker.jar

查看更多...

Tags: Java SCJP 310-055 真题解析 classpath jar

分类:J2SE | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 502
QUESTION 75:
Given:

*************************
相关代码内详
*************************

and the command line invocation:
java Yippee2 a b c
What is the result?
A. a b
B. b c
C. Compilation fails.
D. An exception is thrown at runtime.

查看更多...

Tags: Java SCJP 310-055 真题解析 main 参数 数组 下标

分类:J2SE | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 498

Java中垃圾回收的条件——SCJP真题解析Q74

QUESTION 74:
Given the exhibit:

*************************
相关代码内详
*************************

Which line of code marks the earliest point that an object referenced by intObj becomes a candidate for garbage collection?
A. Line 11
B. Line 12
C. Line 13
D. Line 14
E. The object is NOT a candidate for garbage collection.

查看更多...

Tags: Java SCJP 310-055 真题解析 垃圾回收 条件

分类:J2SE | 固定链接 | 评论: 4 | 引用: 0 | 查看次数: 1462

Java中枚举的用法——SCJP真题解析Q73

QUESTION 73:
Given the exhibit:
enumExample { ONE, TWO, THREE }
Which statement is true?
A. The expressions (ONE == ONE) and ONE.equals(ONE) are both guaranteed to be true.
B. The expression (ONE < TWO ) is guaranteed to be true and ONE.compareTo(TWO) is guaranteed to be less than one.
C. The Example values cannot be used in a raw java.util.HashMap.; instead, the programmer must use a java.util.EnumMap.
D. The Example values can be used in a java.util.SortedSet, but the set will not be sorted because enumerated Type do not implement java.lang.Comparable.

查看更多...

Tags: Java SCJP 310-055 真题解析 枚举 Enum

分类:J2SE | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1376

Java泛型类的边界控制——SCJP真题解析Q72

QUESTION 72:
Given the exhibit:

*************************
相关代码内详
*************************

Which two, inserted at line 1 will allow the code to compile? (Choose Two)
A. public class MinMax<?> {
B. public class MinMax<? extends Number> {
C. public class MinMax<N extends Object> {
D. public class MinMax<N extends Number> {
E. public class MinMax<? extends Object> {
F. public class MinMax<N extends Integer> {

查看更多...

Tags: Java SCJP 310-055 真题解析 泛型 边界控制

分类:J2SE | 固定链接 | 评论: 1 | 引用: 0 | 查看次数: 1215

Java的HashMap中使用自定义类——SCJP真题解析Q71

QUESTION 71:
Given the exhibit:

*************************
相关代码内详
*************************

A programmer is developing a class Key, that will be used as a key in a standard java.util.HashMap.
Which two methods should be overridden to assure that key works correctly as a key? (choose two)
A. public int hashCode()
B. public boolean equals(Key k)
C. public int compareTo(Object o)
D. public boolean equals(Object o)

查看更多...

Tags: Java SCJP 310-055 真题解析 HashMap 自定义类

分类:J2SE | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 1381