QUESTION 131
Given:
SCJP刷题学习笔记 (Part fourteen)
Which two interfaces can you use to create lambda expressions? (Choose two.)
A. T
B. R
C. P
D. S
E. Q
F. U
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 132
Given the code fragment:
SCJP刷题学习笔记 (Part fourteen)
What is the result ?
A. [X]
[X, X]
[X, X, X]
[X, X, X, X]
B. [X, X]
C. [X]
[X, X]
[X, X, X]
D. [X, X]
[X, X, X, X]
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 133
Given that these files exist and are accessible:
SCJP刷题学习笔记 (Part fourteen)
and given the code fragment:
SCJP刷题学习笔记 (Part fourteen)
Which code fragment can be inserted at line n1 to enable the code to print only /company/emp?
A. Stream<Path> stream = Files.list (Paths.get (“/company”));
B. Stream<Path> stream = Files.find(
Paths.get (“/company”), 1,
(p,b) –> b.isDirectory (), FileVisitOption.FOLLOW_LINKS);
C. Stream<Path> stream = Files.walk (Paths.get (“/company”));
D. Stream<Path> stream = Files.list (Paths.get (“/company/emp”));Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 134
Given:
SCJP刷题学习笔记 (Part fourteen)
and the code fragment:
SCJP刷题学习笔记 (Part fourteen)
What is the result?
A. 0
B. A compilation error occurs at line n1.
C. An Exception is thrown at run time.
D. 2
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 135
Which class definition compiles?
SCJP刷题学习笔记 (Part fourteen)
SCJP刷题学习笔记 (Part fourteen)
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 136
Given the code fragment:
SCJP刷题学习笔记 (Part fourteen)
What is the result?
A. 4000 : 2000
B. 4000 : 1000
C. 1000 : 4000
D. 1000 : 2000
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 137
Given that version.txt is accessible and contains:
1234567890
and given the code fragment:
SCJP刷题学习笔记 (Part fourteen)
What is the result?
A. 121
B. 122
C. 135
D. The program prints nothing.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 138
SCJP刷题学习笔记 (Part fourteen)
What is the result?
A. A compilation error occurs at line 7.
B. 100
C. A compilation error occurs at line 8.
D. A compilation error occurs at line 15.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 139
Given the content:
SCJP刷题学习笔记 (Part fourteen)
and given the code fragment:
SCJP刷题学习笔记 (Part fourteen)
Which two code fragments, when inserted at line 1 independently, enable the code to print “Wie geht’s?”
A. currentLocale = new Locale (“de”, “DE”);
B. currentLocale = new Locale.Builder ().setLanguage (“de”).setRegion
(“DE”).build();
C. currentLocale = Locale.GERMAN;
D. currentlocale = new Locale();
currentLocale.setLanguage (“de”);
currentLocale.setRegion (“DE”);
E. currentLocale = Locale.getInstance(Locale.GERMAN,Locale.GERMANY);
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
 
 
 
QUESTION 140
Given the code fragment:
SCJP刷题学习笔记 (Part fourteen)
What is the result?
A. Word: why what when
B. Word: why Word: why what Word: why what when
C. Word: why Word: what Word: when
D. Compilation fails at line n1.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:

相关文章: