最新的Oracle Java SE 8 Programmer I - 1z0-808免費考試真題
Given the code fragment:

What is the result?

What is the result?
正確答案: B
Given:

And given the code fragment:

Which two modifications enable the code to print the following output? Canine 60 Long Feline 80 Short

And given the code fragment:

Which two modifications enable the code to print the following output? Canine 60 Long Feline 80 Short
正確答案: B
What should keyword1 and keyword2 be respectively, in oreder to produce output 2345?
int [] array = {1,2,3,4,5};
for (int i: array) {
if ( i < 2) {
keyword1 ;
}
System.out.println(i);
if ( i == 3) {
keyword2 ;
}}
int [] array = {1,2,3,4,5};
for (int i: array) {
if ( i < 2) {
keyword1 ;
}
System.out.println(i);
if ( i == 3) {
keyword2 ;
}}
正確答案: A
Given:
public class Test1 {
static void doubling (Integer ref, int pv) {
ref =20;
pv = 20;
}
public static void main(String[] args) {
Integer iObj = new Integer(10);
int iVar = 10;
doubling(iObj++, iVar++);
System.out.println(iObj+ ", "+iVar);
What is the result?
public class Test1 {
static void doubling (Integer ref, int pv) {
ref =20;
pv = 20;
}
public static void main(String[] args) {
Integer iObj = new Integer(10);
int iVar = 10;
doubling(iObj++, iVar++);
System.out.println(iObj+ ", "+iVar);
What is the result?
正確答案: D
說明:(僅 Fast2test 成員可見)
Examine:

Which statement is true?

Which statement is true?
正確答案: C
說明:(僅 Fast2test 成員可見)
Given the code fragment:

What is the result?

What is the result?
正確答案: C
Given the following class:

Which two changes would encapsulate this class and ensure that the area field is always equal to length * height whenever the Rectangle class is used?

Which two changes would encapsulate this class and ensure that the area field is always equal to length * height whenever the Rectangle class is used?
正確答案: C,F
Given:
public class SampleClass {
public static void main(String[] args) {
AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass(); sc = asc; System.out.println("sc: " + sc.getClass()); System.out.println("asc: " + asc.getClass());
}}
class AnotherSampleClass extends SampleClass {
}
What is the result?
public class SampleClass {
public static void main(String[] args) {
AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass(); sc = asc; System.out.println("sc: " + sc.getClass()); System.out.println("asc: " + asc.getClass());
}}
class AnotherSampleClass extends SampleClass {
}
What is the result?
正確答案: B
You are asked to create a method that accepts an array of integers and returns the highest value from that array.
Given the code fragment:

Which method signature do you use at line n1?
Given the code fragment:

Which method signature do you use at line n1?
正確答案: D
說明:(僅 Fast2test 成員可見)
The following grid shows the state of a 2D array:

This grid is created with the following code:

Which line of code, when inserted in place of //line n1, adds an X into the grid so that the grid contains three consecutive X's?

This grid is created with the following code:

Which line of code, when inserted in place of //line n1, adds an X into the grid so that the grid contains three consecutive X's?
正確答案: D
Given:

What is the result?

What is the result?
正確答案: B
Given the code fragment:

Which code snippet at line 9 prints true?


Which code snippet at line 9 prints true?

正確答案: B
Given:

Which code fragment should you use at line n1 to instantiate the dvd object successfully?


Which code fragment should you use at line n1 to instantiate the dvd object successfully?

正確答案: C
Given the code fragment

Which code fragments, inserted independently, enable the code compile? (Choose 3)

Which code fragments, inserted independently, enable the code compile? (Choose 3)
正確答案: A,C,F