1Z0-809 Exam Details

  • Exam Code
    :1Z0-809
  • Exam Name
    :Java SE 8 Programmer II
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :207 Q&As
  • Last Updated
    :May 29, 2026

Oracle 1Z0-809 Online Questions & Answers

  • Question 111:

    Given:

    and the code fragment:

    What is the result?

    A. 0.0
    B. 1500.0
    C. A compilation error occurs.
    D. 2000.0

  • Question 112:

    Given the definition of the Vehicle class:

    class Vehicle {

    String name;

    void setName (String name) {

    this.name = name;

    }

    String getName() {

    return name;

    }

    }

    Which action encapsulates the Vehicle class?

    A. Make the Vehicle class public.
    B. Make the name variable public.
    C. Make the setName method public.
    D. Make the name variable private.
    E. Make the setName method private.
    F. Make the getName method private.

  • Question 113:

    Given:

    What change should you make to guarantee a single order of execution (printed values 1 -100 in order)?

    A. Line 3: public synchronized void run() {
    B. Line 1: class MyClass extends Thread {
    C. Line 2: public volatile int value;
    D. Line 2: public synchronized int value;

  • Question 114:

    Given:

    class Vehicle {

    int vno;

    String name;

    public Vehicle (int vno, String name) {

    this.vno = vno,;

    this.name = name;

    }

    public String toString () {

    return vno + ":" + name;

    }

    }

    and this code fragment:

    Set vehicles = new TreeSet <> ();

    vehicles.add(new Vehicle (10123, "Ford"));

    vehicles.add(new Vehicle (10124, "BMW"));

    System.out.println(vehicles);

    What is the result?

    A. 10123 Ford 10124 BMW
    B. 10124 BMW 10123 Ford
    C. A compilation error occurs.
    D. A ClassCastException is thrown at run time.

  • Question 115:

    Given the definition of the Vehicle class:

    Class Vehhicle {

    int distance; //line n1

    Vehicle (int x) {

    this distance = x;

    }

    public void increSpeed(int time) { //line n2

    int timeTravel = time; //line n3

    class Car {

    int value = 0;

    public void speed () {

    value = distance /timeTravel;

    System.out.println ("Velocity with new speed"+value+"kmph");

    }

    }

    new Car().speed();

    }

    }

    and this code fragment:

    Vehicle v = new Vehicle (100);

    A. increSpeed(60); What is the result?
    B. Velocity with new speed
    C. A compilation error occurs at line n1.
    D. A compilation error occurs at line n2.
    E. A compilation error occurs at line n3.

  • Question 116:

    Given the code fragment:

    What is the result?

    A. text1text2
    B. text1text2text2text3
    C. text1
    D. [text1, text2]

  • Question 117:

    Given:

    public class Test {

    private T t;

    public T get () {

    return t;

    }

    public void set (T t) {

    this.t = t;

    }

    public static void main (String args [ ] ) {

    Test type = new Test<>();

    Test type 1 = new Test (); //line n1

    type.set("Java");

    type1.set(100); //line n2

    System.out.print(type.get() + " " + type1.get());

    }

    }

    What is the result?

    A. Java 100
    B. [email protected]@
    C. A compilation error occurs. To rectify it, replace line n1 with: Test type1 = new Test();
    D. A compilation error occurs. To rectify it, replace line n2 with: type1.set (Integer(100));

  • Question 118:

    Given the code fragment:

    UnaryOperator uo1 = s -> s*2; //line n1

    List loanValues = Arrays.asList(1000.0, 2000.0);

    loanValues.stream()

    .filter(lv -> lv >= 1500)

    .map(lv -> uo1.apply(lv)) //line n2

    .forEach(s -> System.out.print(s + " "));

    What is the result?

    A. 4000.0
    B. 4000
    C. A compilation error occurs at line n1.
    D. A compilation error occurs at line n2.

  • Question 119:

    Given:

    and the code fragment:

    Which definition of the ColorSorter class sorts the blocks list?

    A. Option A
    B. Option B
    C. Option C
    D. Option D

  • Question 120:

    Given the definition of the Emp class:

    public class Emp

    private String eName;

    private Integer eAge;

    Emp(String eN, Integer eA) {

    this.eName = eN;

    this.eAge = eA;

    }

    public Integer getEAge () {return eAge;}

    public String getEName () {return eName;}

    }

    and code fragment:

    Listli = Arrays.asList(new Emp("Sam", 20), New Emp("John", 60), New Emp("Jim", 51)); Predicate agVal = s -> s.getEAge() <= 60; //line n1

    li = li.stream().filter(agVal).collect(Collectors.toList());

    Stream names = li.stream()map.(Emp::getEName); //line n2

    names.forEach(n -> System.out.print(n + " "));

    What is the result?

    A. Sam John Jim
    B. John Jim
    C. A compilation error occurs at line n1.
    D. A compilation error occurs at line n2.

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-809 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.