Want to pass your Java SE 8 Programmer II 1Z0-809 exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Given:
IntStream stream = IntStream.of (1,2,3);
IntFunction
IntStream newStream = stream.map(inFu.apply(10)); //line n2
newStream.forEach(System.output::print);
Which modification enables the code fragment to compile?
A. Replace line n1 with: IntFunction
B. Replace line n1 with: IntFunction
C. Replace line n1 with: BiFunction
D. Replace line n2 with: IntStream newStream = stream.map(inFu.applyAsInt (10));
The data.doc, data.txt and data.xml files are accessible and contain text.
Given the code fragment:
Stream
Paths. get("data.txt"),
Paths. get("data.xml"));
paths.filter(s-> s.toString().endWith("txt")).forEach(
s -> {
try {
Files.readAllLines(s)
.stream()
.forEach(System.out::println); //line n1
} catch (IOException e) {
System.out.println("Exception");
}
}
);
What is the result?
A. The program prints the content of data.txt file.
B. The program prints: Exception <
C. A compilation error occurs at line n1.
D. The program prints the content of the three files.
Given the records from the STUDENT table:

Given the code fragment:

Assume that the URL, username, and password are valid.
What is the result?
A. The STUDENT table is not updated and the program prints:
114 : John : john@uni.com
B. The STUDENT table is updated with the record:
113 : Jannet : jannet@uni.com
and the program prints:
114 : John : john@uni.com
C. The STUDENT table is updated with the record:
113 : Jannet : jannet@uni.com
and the program prints:
113 : Jannet : jannet@uni.com
D. A SQLException is thrown at run time.