Java Certification : OCP (1Z0-809) Practice Test Udemy
Price: USD 3,200
  • Duration: Flexible

Course details

Are you ready to pass OCP- Java SE 8 Programmer II certification and prove your competency to recruiters and employers alike?


OCP - Java SE 8 Programmer II - Exam Information:

  • Exam Code: 1Z0-809
  • Duration: 150 minutes
  • Questions #: 85 (Multiple Choice / Multiple Select)
  • Passing score: 65% 


Exam Curriculum:

  • Java Class Design
  • Advanced Java Class Design
  • Generics and Collections
  • Lambda Built-in Functional Interfaces
  • Java Stream API
  • Exceptions and Assertions
  • Use Java SE 8 Date/Time API
  • Java I/O Fundamentals
  • Java File I/O (NIO.2)
  • Java Concurrency
  • Building Database Applications with JDBC
  • Localization


Practice tests are randomized to give a real examination feel. All topics listed above are divided appropriately in 6 tests consisting 85 questions each i.e., 510 questions in totalQuestions are designed based on real examination questions in terms of pattern and complexity. All Exam topics and sub-topics are covered.


Explanation of all the correct answers is also provided for reference and understanding. Relevant hints and how to approach a question in real examination setting is also provided in explanation.

Successful completion of all the tests will boost your confidence to attempt Oracle Certified Professional -Java SE 8 Programmer II examination. 

More information on detailed curriculum and assumptions to be followed for examination are available on oracle certification page.


Disclaimer : These questions are not real examination questions / dumps. These questions  are created to evaluate your preparation for certification exam. 

Some examples of exam questions are provided below:-

Q 1. Given code of Test.java file: 

package com.udayan.ocp;import java.util.ArrayList;import java.util.List;import java.util.concurrent.*;class Accumulator {    private List<Integer> list = new ArrayList<>();    public synchronized void accumulate(int i) {        list.add(i);    }    public List<Integer> getList() {        return list;    }}public class Test {    public static void main(String [] args) {        ExecutorService s = Executors.newFixedThreadPool(1000);        Accumulator a = new Accumulator();        for(int i=1; i<=1000; i++) {            int x = i;            s.execute(() -> a.accumulate(x));        }        s.shutdown();        System.out.println(a.getList().size());    }}

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

A. It will always print 1000 on to the console. 
B. It can print any number between 0 and 1000.
C. The program will wait indefinitely.

Answer: B

*******************************************************************************

Q 2. Given code of Test.java file: 

package com.udayan.ocp;class MyResource implements AutoCloseable {    @Override    public void close() {        System.out.println("Closing");    }}public class Test {    public static void main(String[] args) {        try(AutoCloseable resource = new MyResource()) {        }    }}

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

A. Compilation error in MyResource class
B. Compilation error in Test class
C. Closing

Answer: B

*******************************************************************************

Q 3. Given code of Test.java file:

package com.udayan.ocp;class Printer<String> {    private String t;    Printer(String t){        this.t = t;    }}public class Test {    public static void main(String[] args) {        Printer<Integer> obj = new Printer<>(100);        System.out.println(obj);    }}

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

A. 100
B. Some text containing @ symbol
C. Compilation error in Printer class
D. Compilation error in Test class

Answer: B

*******************************************************************************

Q 4. Given code of Test.java file: 

package com.udayan.ocp;import java.util.Arrays;import java.util.Comparator;public class Test {    public static void main(String[] args) {        String [] arr = {"A5", "B4", "C3", "D2", "E1"};        Arrays.sort(arr, Comparator.comparing(s -> s.substring(1)));        for(String str : arr) {            System.out.print(str + " ");        }    }}

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

A. E1 D2 C3 B4 A5 
B. A5 B4 C3 D2 E1 
C. A1 B2 C3 D4 E5 
D. E5 D4 C3 B2 A1 

Answer: A


Updated on 27 May, 2018
Courses you can instantly connect with... Do an online course on Java starting now. See all courses

Is this the right course for you?

Rate this page

Didn't find what you were looking for ?

or