本月博客排行
-
第1名
龙儿筝 -
第2名
zysnba -
第3名
johnsmith9th - wy_19921005
- sgqt
年度博客排行
-
第1名
宏天软件 -
第2名
青否云后端云 -
第3名
龙儿筝 - gashero
- wallimn
- vipbooks
- wy_19921005
- benladeng5225
- fantaxy025025
- javashop
- qepwqnp
- e_e
- 解宜然
- zysnba
- ssydxa219
- sam123456gz
- ranbuijj
- arpenker
- tanling8334
- kaizi1992
- sichunli_030
- xpenxpen
- gaojingsong
- wiseboyloves
- xiangjie88
- ganxueyun
- xyuma
- wangchen.ily
- jh108020
- zxq_2017
- jbosscn
- lemonhandsome
- luxurioust
- Xeden
- lzyfn123
- forestqqqq
- zhanjia
- nychen2000
- ajinn
- wjianwei666
- johnsmith9th
- hanbaohong
- daizj
- 喧嚣求静
- silverend
- mwhgJava
- kingwell.leng
- lchb139128
- lich0079
- kristy_yy
最新文章列表
第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.
...