EXPERTY DESIGNED 1Z0-808 PRACTICE TEST

Oracle 1Z0-808 Exam Questions
Total Questions: 608
Java SE 8 Programmer I
Updated On: Aug 21, 2019
Page : 1-61
Question 1

Given the code fragment:

1Z0-808
What is the result?

Options :
Answer: A

Question 2

Consider below code of Test.java file:

1. package com.sampleproject.oca;

2.  

3. class Super {

4.     public String num = "10"; //Line n1

5. }

6.  

7. class Sub extends Super {

8.     protected int num = 20; //Line n2

9. }

10.  

11. public class Test {

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

13.         Super obj = new Sub();

14.         System.out.println(obj.num += 2); //Line n3

15.     }

16. }

What will be the result of compiling and executing above code?

Options :
Answer: F

Question 3

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 4

Given the code fragment:

1Z0-808
Which option represents the state of the num array after successful completion of the outer loop?

Options :
Answer: B

Question 5

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

package com.udayan.oca;

 

public class Test {

 

     private static void add(double d1, double d2) {

         System.out.println("double version: " + (d1 + d2));

     }

 

     private static void add(Double d1, Double d2) {

        System.out.println("Double version: " + (d1 + d2));

     }

 

     public static void main(String[] args) {

         add(10.0, null);

     }

 

}

Options :
Answer: B

© 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.