EXPERTY DESIGNED 1Z0-808 PRACTICE TEST

Oracle 1Z0-808 Exam Questions
Total Questions: 608
Java SE 8 Programmer I
Updated On: Jan 27, 2026
Page : 1-61
Question 1

Consider below code: 

1. //Test.java

2. package com.udayan.oca;

3.  

4. import java.time.LocalDate;

5.  

6. public class Test {

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

8.          LocalDate joiningDate = LocalDate.parse("2006-03-16");

9.          System.out.println(joiningDate.withDayOfYear(29));

10.      }

11. }

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

Options :
Answer: B

Question 2

Given this code for a Planet object:

HPE6-A70
What is the output?

Options :
Answer: C

Question 3

Given code of Test.java file:

1. package com.sampleproject.oca;

2.  

3. interface Blogger {

4.     default void blog() throws Exception {

5.         System.out.println("GENERIC");

6.     }

7. }

8.  

9. class TravelBlogger implements Blogger {

10.     public void blog() {

11.         System.out.println("TRAVEL");

12.     }

13. }

14.  

15. public class Test {

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

17.         Blogger blogger = new TravelBlogger(); //Line n1

18.         ((TravelBlogger)blogger).blog(); //Line n2

19.     }

20. }

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

Options :
Answer: B

Question 4

Given code of Test.java file:

1. package com.sampleproject.oca;

2.  

3. abstract class Animal {

4.     abstract void jump() throws RuntimeException;

5. }

6.  

7. class Deer extends Animal {

8.     void jump() { //Line n1

9.         System.out.println("DEER JUMPS");

10.     }

11.  

12.     void jump(int i) {

13.         System.out.println("DEER JUMPS TO " + i + " FEET");

14.     }

15. }

16.  

17. public class Test {

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

19.         Animal animal = new Deer();

20.         ((Deer)animal).jump(); //Line n2

21.         ((Deer)animal).jump(5); //Line n3

22.     }

23. }

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

Options :
Answer: A

Question 5

Consider below code:

1. package com.udayan.oca;

2.  

3. public class Test {

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

5.         StringBuilder sb = new StringBuilder();

6.         try {

7.             for(;;) {

8.                 sb.append("OCA");

9.             }

10.         } catch(Exception e) {

11.             System.out.println("Exception!!!");

12.         }

13.         System.out.println("Main ends!!!");

14.     }

15. }

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

Options :
Answer: D

© Copyrights Oracledumps 2026. 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.