Oracle Java SE 8 Programmer II - 1z1-809 Exam Practice Test
Given the records from the STUDENT table:

Given the code fragment:

Assume that the URL, username, and password are valid.
What is the result?

Given the code fragment:

Assume that the URL, username, and password are valid.
What is the result?
Correct Answer: D
Vote an answer
In 2015, daylight saving time in New York, USA, begins on March 8th at 2:00 AM. As a result, 2:00 AM becomes 3:00 AM.
Given the code fragment:

Which is the result?
Given the code fragment:

Which is the result?
Correct Answer: B
Vote an answer
Given the content:

and given the code fragment:

Which two code fragments, when inserted at line 1 independently, enable the code to print "Wie geht's?"

and given the code fragment:

Which two code fragments, when inserted at line 1 independently, enable the code to print "Wie geht's?"
Correct Answer: A,B
Vote an answer
Given the structure of the Student table:
Student (id INTEGER, name VARCHAR)
Given the records from the STUDENT table:

Given the code fragment:

Assume that:
What is the result?
Student (id INTEGER, name VARCHAR)
Given the records from the STUDENT table:

Given the code fragment:

Assume that:
What is the result?
Correct Answer: C
Vote an answer
Given that /green.txt and /colors/yellow.txt are accessible, and the code fragment:
Path source = Paths.get("/green.txt);
Path target = Paths.get("/colors/yellow.txt);
Files.move(source, target, StandardCopyOption.ATOMIC_MOVE);
Files.delete(source);
Which statement is true?
Path source = Paths.get("/green.txt);
Path target = Paths.get("/colors/yellow.txt);
Files.move(source, target, StandardCopyOption.ATOMIC_MOVE);
Files.delete(source);
Which statement is true?
Correct Answer: C
Vote an answer
Given the Greetings.properties file, containing:

and given:

What is the result?

and given:

What is the result?
Correct Answer: C
Vote an answer
Given the code fragment:
List<Double> doubles = Arrays.asList (100.12, 200.32);
DoubleFunction funD = d -> d + 100.0;
doubles.stream (). forEach (funD); // line n1
doubles.stream(). forEach(e -> System.out.println(e)); // line n2
What is the result?
List<Double> doubles = Arrays.asList (100.12, 200.32);
DoubleFunction funD = d -> d + 100.0;
doubles.stream (). forEach (funD); // line n1
doubles.stream(). forEach(e -> System.out.println(e)); // line n2
What is the result?
Correct Answer: B
Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
Given that course.txt is accessible and contains:
Course : : Java
and given the code fragment:
public static void main (String[ ] args) {
int i;
char c;
try (FileInputStream fis = new FileInputStream ("course.txt");
InputStreamReader isr = new InputStreamReader(fis);) {
while (isr.ready()) { //line n1
isr.skip(2);
i = isr.read ();
c = (char) i;
System.out.print(c);
}
} catch (Exception e) {
e.printStackTrace();
}
}
What is the result?
Course : : Java
and given the code fragment:
public static void main (String[ ] args) {
int i;
char c;
try (FileInputStream fis = new FileInputStream ("course.txt");
InputStreamReader isr = new InputStreamReader(fis);) {
while (isr.ready()) { //line n1
isr.skip(2);
i = isr.read ();
c = (char) i;
System.out.print(c);
}
} catch (Exception e) {
e.printStackTrace();
}
}
What is the result?
Correct Answer: B
Vote an answer
Given:

Which two interfaces can you use to create lambda expressions? (Choose two.)

Which two interfaces can you use to create lambda expressions? (Choose two.)
Correct Answer: A,E
Vote an answer




