Free 1Z0-808 Mock Exam – Practice Online Confidently

Increase your chances of passing the Oracle 1Z0-808 exam questions on your first try. Practice with our free online 1Z0-808 exam mock test designed to help you prepare effectively and confidently.

Exam Code: 1Z0-808
Exam Questions: 608
Java SE 8 Programmer I
Updated: 04 Jan, 2026
Question 1

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

1. package com.udayan.oca;

2.  

3. import java.util.ArrayList;

4. import java.util.List;

5.  

6. public class Test {

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

8.          List list = new ArrayList<>();

9.          list.add(100);

10.          list.add(200);

11.          list.add(100);

12.          list.add(200);

13.          list.remove(new Integer(100));

14.  

15.          System.out.println(list);

16.      }

17. }

Options :
Answer: E

Question 2

Range of short data type is from -32768 to 32767

Which of the following code segments, written inside main method will compile successfully?

Select 3 options.

Options :
Answer: B,D

Question 3

Given:

1Z0-808
and the code fragment:
1Z0-808
What is the result?

Options :
Answer: C

Question 4

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

package com.udayan.oca;

 

public class Test {

    public static void main(String[] args) {

        m1(null);

    }

    

    static void m1(CharSequence s) {

        System.out.println("CharSequence");

    }

    

    static void m1(String s) {

        System.out.println("String");

    }

   

    static void m1(Object s) {

        System.out.println("Object");

    }

}

Options :
Answer: D

Question 5

Consider below code:

1. //Test.java

2. package com.udayan.oca;

3.  

4. public class Test {

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

6.         StringBuilder sb = new StringBuilder(100);

7.         System.out.println(sb.length() + ":" + sb.toString().length());

8.     }

9. }

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

Options :
Answer: B

Viewing Page : 1 - 61
Practicing : 1 - 5 of 608 Questions

© Copyrights FreeMockExams 2026. All Rights Reserved

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