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

Consider below codes of 3 java files:

1. //Super.java

2. package com.sampleproject.oca;

3.  

4. public interface Super {

5.     String name = "SUPER"; //Line n1

6. }

1. //Sub.java

2. package com.sampleproject.oca;

3.  

4. public interface Sub extends Super { //Line n2

5.  

6. }

1. //Test.java

2. package com.sampleproject.oca;

3.  

4. public class Test {

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

6.         Sub sub = null;

7.         System.out.println(sub.name); //Line n3

8.     }

9.

Which of the following statements is correct?

Options :
Answer: E

Question 2

Given:

HPE6-A70
What is the result?

Options :
Answer: D

Question 3

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

package com.udayan.oca;

 

import java.util.ArrayList;

import java.util.List;

 

public class Test {

     public static void main(String[] args) {

         List list = new ArrayList<>();

         list.add(100);

         list.add(7);

         list.add(50);

         list.add(17);

         list.add(10);

         list.add(5);

 

         list.removeIf(a -> a % 10 == 0);

 

         System.out.println(list);

     }

}

Options :
Answer: A

Question 4

Given code of Thought.java file:

1. public class Thought {

2.     /*INSERT*/ {

3.         System.out.println("All is well");

4.     }

5. }

Which 3 options, if used to replace /*INSERT*/, will compile successfully and on execution will print "All is well" on to the console?

Options :
Answer: A,B,G

Question 5

CGiven the code fragments:

HPE6-A70
Which code fragment, when inserted at line n1, enables the code to print Hank?

Options :
Answer: C

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