EXPERTY DESIGNED 1Z0-809 PRACTICE TEST

Oracle 1Z0-809 Exam Questions
Total Questions: 469
Java SE 8 Programmer II
Updated On: Dec 18, 2025
Page : 1-47
Question 1

Given code of Test.java file: 

1. package com.udayan.ocp;

2.  

3. public class Test {

4.     private static void m1() throws Exception {

5.         throw new Exception();

6.     }

7.  

8.     public static void main(String[] args) {

9.         try {

10.             m1();

11.         } finally {

12.             System.out.println("A");

13.         }

14.     }

15. }

What will be the result of compiling and executing Test class?

Options :
Answer: D

Question 2

Given code of Test.java file: 

1. package com.udayan.ocp;

2.  

3. import java.util.*;

4.  

5. public class Test {

6.     public static void main(String[] args) {

7.         NavigableMap map = new TreeMap<>();

8.         map.put(25, "Pune");

9.         map.put(32, "Mumbai");

10.         map.put(11, "Sri Nagar");

11.         map.put(39, "Chennai");

12.  

13.         System.out.println(map.headMap(25, true));

14.     }

15. }

Options :
Answer: C

Question 3

Given code of Test.java file: 

1. package com.udayan.ocp;

2.  

3. import java.time.*;

4.  

5. public class Test {

6.     public static void main(String [] args) {

7.         System.out.println(Duration.ofDays(-2));

8.     }

9. }

What will be the result of compiling and executing Test class?

Options :
Answer: D

Question 4

You want to create a singleton class by using the Singleton design pattern. Which two statements enforce the singleton nature of the design? (Choose two.)

Options :
Answer: A,B

Question 5

Given:

Untitled1-page69-image101
From what threading problem does the program suffer?

Options :
Answer: B

© Copyrights Oracledumps 2025. All Rights Reserved

We use cookies to ensure that we give you the best experience on our website (Oracledumps). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the Oracledumps.