本月博客排行
-
第1名
Xeden -
第2名
fantaxy025025 -
第3名
bosschen - paulwong
- johnsmith9th
- zysnba
- xiangjie88
年度博客排行
-
第1名
青否云后端云 -
第2名
宏天软件 -
第3名
gashero - gengyun12
- wy_19921005
- vipbooks
- e_e
- benladeng5225
- ranbuijj
- wallimn
- javashop
- jickcai
- fantaxy025025
- zw7534313
- qepwqnp
- robotmen
- 解宜然
- ssydxa219
- zysnba
- sam123456gz
- sichunli_030
- tanling8334
- arpenker
- gaojingsong
- xpenxpen
- kaizi1992
- wiseboyloves
- jh108020
- xyuma
- ganxueyun
- wangchen.ily
- xiangjie88
- Jameslyy
- luxurioust
- mengjichen
- lemonhandsome
- jbosscn
- nychen2000
- zxq_2017
- lzyfn123
- wjianwei666
- forestqqqq
- ajinn
- siemens800
- hanbaohong
- 狂盗一枝梅
- java-007
- zhanjia
- 喧嚣求静
- Xeden
最新文章列表
第1章-声明和访问控制
1、Java回顾
Java 程序主要是对象的集合,对象之间通过调用彼此的方法与其他对象进行交互,共同完成一项或多项任务。Java中每个对象都属于某一个类(class)或一个借口(interface)定义的类型。
类:描述对象状态和行为的模板。
对象:类的具体实例,拥有自己的状态以及对其父类所有行为的访问权限。
状态(实例变量):每个对象拥有的类定义的独特的实例变量集,实例 ...
SCJP
1> Wrapper
1) Boxing, ==, and equals()
public class WrapperTest {
@Test
public void integerEqualsTest() {
assertFalse(new Integer(127) == new Integer(127));
assertTrue((new Inte ...
SCJP真题库更新21
QUESTION 101
Given:
What creates the appropriate DateFormat object and adds a day to the Date object?
A. 35. Dateformat df = Dateformat.getDateFormat();
42. d.setTime ( (60 * 60 * 24) + ...
SCJP真题库更新20
QUESTION 96
Given:
What is the result?
A. Compilation fails
B. Pi is approximately 3.
C. Pi is approximately 3.141593.
D. An exception is thrown at runtime.
Answer: ( D )
%d
SCJP真题库更新19
QUESTION 91
Given a method that must ensure that its parameter is not null:
What, inserted at line 12, is the appropriate way to handle a null value?
A. assert value = = null;
B. assert valu ...
SCJP真题库更新18
QUESTION 86
Given:
What is the result?
A. A, B, C
B. B, C, A
C. Compilation fails
D. The code runs with no output
E. An exception is thrown at runtime
SCJP真题库更新17
QUESTION 81
Given:
and two separate command line invocations:
java Yippee
java Yippee 1 2 3 4
What is the result?
A. No output is produced.
1 2 3
SCJP真题库更新16
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
Wh ...
SCJP真题库更新15
QUESTION 71
Given:
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 a ...
SCJP真题库更新14
QUESTION 66
Given a pre-generics implementation of a method:
Which three changes must be made to the method sum to use generics? (choose three)
A. remove line 14
B. replace line 14 with & ...
SCJP真题库更新13
QUESTION 61
GIVEN THE EXHIBIT:
Which statement is true?
A. All of the assert statements are used appropriately.
B. Only the assert statement on line 31 is used appropriately
C. The asser ...
SCJP真题库更新12
QUESTION 51
Given the exhibit:
Which two statements are true? (choose two)
A. Certkiller.beta ( ) is a valid invocation of beta ( )
B. Certkiller.alpha ( ) is a valid invocation of alpha ( ...
SCJP真题库更新11
QUESTION 46
1.public class Test{
2. int x = 12;
3. public void method(int x ){
4. x += x;
5. System.out.println( x);
6. }
SCJP真题库更新10
QUESTION 41
Given the exhibit:
What is the result when this code executed?
A. 1
B. 3
C. 123
D. 321
E. The code runs with no output
SCJP真题库更新9
QUESTION 36
Given the exhibit:
C. System.property ("prop.custom");
D. System.getProperty ("prop.custom"); 根据系统参数来取出对应的参数内容
E. System.getProperties ( ).getProperty (" ...
SCJP真题库更新8
QUESTION 31
Exhibit:
What is the output of the program shown in the exhibit?
A. 300.100.100.100.100
B. 300.300.100.100.100
C. 300.300.300.100.100
D. 300.300.300.300.100
Answer: ( B ...
SCJP真题库更新7
QUESTION 25
Exhibit:
What is the result?
A. Value is : 8
B. Compilation fails.
C. Value is : 12
D. Value is ; -12
E. The code runs with no output
F. An exception is thrown at runtime.
...