【TOP】M商城V1.9(增加商品搜索、最新商品功能,修正BUG)
作者:Magci 日期:2008-06-16 01:39
【TOP】Java坦克大战网络对战平台V4.8(完善功能、发布程序)
作者:Magci 日期:2008-05-02 04:06
【TOP】Java坦克大战图片版V3.6(修正BUG,发布程序)
作者:Magci 日期:2008-04-26 16:53
Java中基本类型和引用类型赋值的区别——SCJP真题解析Q77
作者:Magci 日期:2011-07-29 10:20
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);
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);
Java中设置classpath环境变量的问题——SCJP真题解析Q76
作者:Magci 日期:2011-07-28 15:39
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
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
Java中main函数的参数和数组的下标——SCJP真题解析Q75
作者:Magci 日期:2011-07-28 14:53
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.
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.
Java中垃圾回收的条件——SCJP真题解析Q74
作者:Magci 日期:2010-06-28 17:59
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.
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.
Java中枚举的用法——SCJP真题解析Q73
作者:Magci 日期:2010-06-28 17:32
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.
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.
Java泛型类的边界控制——SCJP真题解析Q72
作者:Magci 日期:2010-06-28 15:49
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> {
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> {
Java的HashMap中使用自定义类——SCJP真题解析Q71
作者:Magci 日期:2010-06-28 14:12
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)
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)










