Question 19

Which two methods from the java.util.stream.Stream interface perform a reduction operation? (Choose two.)

Correct Answer:AB

Question 20

Given:
1. abstract class Shape {
2. Shape ( ) { System.out.println (“Shape”); }
3. protected void area ( ) { System.out.println (“Shape”); } 4. }
5.
6. class Square extends Shape {
7. int side;
8. Square int side {
9. /* insert code here */
10. this.side = side;
11. }
12. public void area ( ) { System.out.println (“Square”); }
13. }
14. class Rectangle extends Square {
15. int len, br;
16. Rectangle (int x, int y) {
17. /* insert code here */
18. len = x, br = y;
19. }
20. void area ( ) { System.out.println (“Rectangle”); }
21. }
Which two modifications enable the code to compile? (Choose two.)

Correct Answer:DF

Question 21

Given the code fragments:
1Z0-809 dumps exhibit
and
1Z0-809 dumps exhibit
Which two modifications enable to sort the elements of the emps list? (Choose two.)

Correct Answer:CE

Question 22

Given the code fragment:
Path p1 = Paths.get(“/Pics/MyPic.jpeg”); System.out.println (p1.getNameCount() + “:” + p1.getName(1) +
“:” + p1.getFileName());
Assume that the Pics directory does NOT exist.
What is the result?

Correct Answer:B

Question 23

Given the code fragment:
Path path1 = Paths.get(“/app/./sys/”); Path res1 = path1.resolve(“log”);
Path path2 = Paths.get(“/server/exe/”); Path res1 = path1.resolve(“/readme/”); System.out.println(res1); System.out.println(res2);
What is the result?

Correct Answer:C

Question 24

Given the code fragment:
1Z0-809 dumps exhibit
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with the dbURL, userName, and passWord exists The Employee table has a column ID of type integer and the SQL query matches one record. What is the result?

Correct Answer:A

START 1Z0-809 EXAM