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 121:

    Given:

    public class Canvas implements Drawable {

    public void draw () { }

    }

    public abstract class Board extends Canvas { }

    public class Paper extends Canvas {

    protected void draw (int color) { }

    }

    public class Frame extends Canvas implements Drawable {

    public void resize () { }

    abstract void open ();

    }

    public interface Drawable {

    public abstract void draw ();

    }

    Which statement is true?

    A. Board does not compile.
    B. Paper does not compile.
    C. Frame does not compile.
    D. Drawable does not compile.
    E. All classes compile successfully.

  • Question 122:

    Given that these files exist and are accessible:

    /sports/info.txt

    /sports/cricket/players.txt

    /sports/cricket/data/ODI.txt

    and given the code fragment:

    int maxDepth =2;

    Stream paths = Files.find(Paths.get("/sports"),

    maxDepth,

    (p, a) -> p.getFileName().toString().endsWith ("txt"),

    FileVisitOption.FOLLOW_LINKS);

    Long fCount = paths.count();

    System.out.println(fCount);

    Assuming that there are NO soft-link/symbolic links to any of the files in the directory structure, what is the result?

    A. 1
    B. 2
    C. 3
    D. An Exception is thrown at runtime.

  • Question 123:

    Assume customers.txt is accessible and contains multiple lines. Which code fragment prints the contents of the customers.txt file?

    A. Stream stream = Files.find (Paths.get ("customers.txt")); stream.forEach((String c) -> System.out.println(c));
    B. Stream stream = Files.find (Paths.get ("customers.txt")); stream.forEach( c) -> System.out.println(c));
    C. Stream stream = Files.list (Paths.get ("customers.txt")); stream.forEach( c) -> System.out.println(c));
    D. Stream lines = Files.lines (Paths.get ("customers.txt")); lines.forEach( c) -> System.out.println(c));

  • Question 124:

    Given the code fragment:

    Path file = Paths.get ("courses.txt"); // line n1

    Assume the courses.txt is accessible.

    Which code fragment can be inserted at line n1 to enable the code to print the content of the courses.txt file?

    A. List fc = Files.list(file); fc.stream().forEach (s - > System.out.println(s));
    B. Stream fc = Files.readAllLines (file); fc.forEach (s - > System.out.println(s));
    C. List fc = readAllLines(file); fc.stream().forEach (s - > System.out.println(s));
    D. Stream fc = Files.lines (file); fc.forEach (s - > System.out.println(s));

  • Question 125:

    Given the code fragment:

    Path p1 = Paths.get("/Pics/MyPic.jpeg"); System.out.println (p1.getNameCount() + ":" + p1.getName(1) + ":" + p1.getFileName());

    Assume that the Pics directory does NOT exist. What is the result?

    A. An exception is thrown at run time.
    B. 2:MyPic.jpeg: MyPic.jpeg
    C. 1:Pics:/Pics/ MyPic.jpeg
    D. 2:Pics: MyPic.jpeg

  • Question 126:

    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() > 50; //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.

  • Question 127:

    Given:

    public class Counter {

    public static void main (String[ ] args) {

    int a = 10;

    int b = -1;

    assert (b >=1) : "Invalid Denominator";

    int = a / b;

    System.out.println (c);

    }

    }

    What is the result of running the code with the 璬a option?

    A. -10
    C. An AssertionError is thrown.
    D. A compilation error occurs.

  • Question 128:

    Given the records from the Employee table:

    and given the code fragment:

    try {

    Connection conn = DriverManager.getConnection (URL, userName, passWord);

    Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,

    ResultSet.CONCUR_UPDATABLE);

    st.execute("SELECT*FROM Employee");

    ResultSet rs = st.getResultSet();

    while (rs.next()) {

    if (rs.getInt(1) ==112) {

    rs.updateString(2, "Jack");

    }

    }

    rs.absolute(2);

    System.out.println(rs.getInt(1) + " " + rs.getString(2));

    } catch (SQLException ex) {

    System.out.println("Exception is raised");

    }

    Assume that:

    The required database driver is configured in the classpath.

    The appropriate database accessible with the URL, userName, and passWord exists.

    What is the result?

    A. The Employee table is updated with the row: 112 Jack and the program prints: 112 Jerry
    B. The Employee table is updated with the row: 112 Jack and the program prints: 112 Jack
    C. The Employee table is not updated and the program prints: 112 Jerry
    D. The program prints Exception is raised.

  • Question 129:

    Given:

    class Student {

    String course, name, city;

    public Student (String name, String course, String city) {

    this.course = course; this.name = name; this.city = city;

    }

    public String toString() {

    return course + ":" + name + ":" + city;

    }

    and the code fragment:

    List stds = Arrays.asList(

    new Student ("Jessy", "Java ME", "Chicago"),

    new Student ("Helen", "Java EE", "Houston"),

    new Student ("Mark", "Java ME", "Chicago"));

    stds.stream()

    .collect(Collectors.groupingBy(Student::getCourse))

    .forEach(src, res) -> System.out.println(scr));

    What is the result?

    A. [Java EE: Helen:Houston] [Java ME: Jessy:Chicago, Java ME: Mark:Chicago]
    B. Java EE Java ME
    C. [Java ME: Jessy:Chicago, Java ME: Mark:Chicago] [Java EE: Helen:Houston]
    D. A compilation error occurs.

  • Question 130:

    Given the code fragment:

    public static void main (String [ ] args) throws IOException {

    BufferedReader br = new BufferedReader (new InputStremReader (System.in));

    System.out.print ("Enter GDP: ");

    //line 1

    }

    Which code fragment, when inserted at line 1, enables the code to read the GDP from the user?

    A. int GDP = Integer.parseInt (br.readline());
    B. int GDP = br.read();
    C. int GDP = br.nextInt();
    D. int GDP = Integer.parseInt (br.next());

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.