Exam Details

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

Oracle Oracle Database 1Z0-809 Questions & Answers

  • Question 11:

    Given the code fragment:

    List empDetails = Arrays.asList("100, Robin, HR", "200, Mary, AdminServices","101, Peter, HR");

    empDetails.stream()

    .filter(s-> s.contains("r"))

    .sorted()

    .forEach(System.out::println); //line n1

    What is the result?

    A. 100, Robin, HR 101, Peter, HR

    B. E. A compilation error occurs at line n1.

    C. 101, Peter, HR 200, Mary, AdminServices

    D. 100, Robin, HR 200, Mary, AdminServices 101, Peter, HR

  • Question 12:

    Given the EMPLOYEE table:

    Given the code fragment: Assuming the database supports scrolling and updating, what is the result?

    A. The program throws a runtime exception at Line 1.

    B. A compilation error occurs.

    C. A new record is inserted and Employee Id: 102, Employee Name: Peter is displayed.

    D. A new record is inserted and Employee Id: 104, Employee Name: Michael is displayed.

  • Question 13:

    Given the code fragment:

    What is the result?

    A. ACBD // in random order ABCD

    B. ABCD // in random order ABCD // in random order

    C. ABCD // in random order BCAD

    D. A compile time error occurs.

  • Question 14:

    Given the information: Emp table has 10 records. Given the code fragment:

    Which code fragment, inserted at Line n1, helps you determine the number of records in ResultSet?

    A. ResultSetMetaData rsmd = rs.getMetaData(); int totRows = rsmd.getRowCount();

    B. int totRows=0; while(rs.next()){ totRows++; }

    C. rs.last(); int totRows = rs.getRowCount();

    D. rs.last(); int totRows = rs.getRowId(1);

  • Question 15:

    Given the code fragment:

    Stream files = Files.list(Paths.get(System.getProperty("user.home"))); files.forEach (fName -> { //

    line n1

    try {

    Path aPath = fName.toAbsolutePath(); //line n2

    System.out.println(fName + ":"

    + Files.readAttributes(aPath, Basic.File.Attributes.class).creationTime

    ());

    } catch (IOException ex) {

    ex.printStackTrace();

    });

    What is the result?

    A. All files and directories under the home directory are listed along with their attributes.

    B. A compilation error occurs at line n1.

    C. The files in the home directory are listed along with their attributes.

    D. A compilation error occurs at line n2.

  • Question 16:

    Given the code fragment:

    BiFunction val = (t1, t2) -> t1 + t2; //line n1 //line n2 System.out.println(val.apply(10, 10.5));

    What is the result?

    A. 20

    B. 20.5

    C. A compilation error occurs at line n1.

    D. A compilation error occurs at line n2.

  • Question 17:

    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;

    }

    public String getCourse() {return course;}

    public String getName() {return name;}

    public String getCity() {return 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(res));

    What is the result?

    A. A compilation error occurs.

    B. Java EE Java ME

    C. [Java EE: Helen:Houston] [Java ME: Jessy:Chicago, Java ME: Mark:Chicago]

    D. [Java ME: Jessy:Chicago, Java ME: Mark:Chicago] [Java EE: Helen:Houston]

  • Question 18:

    Given the code fragment:

    ZonedDateTime depart = ZonedDateTime.of(2015, 1, 15, 1, 0, 0, 0, ZoneID.of("UTC-7")); ZonedDateTime

    arrive = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of("UTC-5")); long hrs =

    ChronoUnit.HOURS.between(depart, arrive); //line n1

    System.out.println("Travel time is" + hrs + "hours");

    What is the result?

    A. Travel time is 4 hours

    B. Travel time is 6 hours

    C. Travel time is 8 hours

    D. An exception is thrown at line n1.

  • Question 19:

    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 = Files.readAllLines(file); fc.stream().forEach (s -> System.out.println(s));

    D. Stream fc = Files.list (file); fc.forEach (s -> System.out.println(s));

  • Question 20:

    Given the code fragment:

    LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);

    LocalDate next15days = valentinesDay.plusDays (15);

    LocalDate nextYear = next15days.plusYears(1); // line n1

    System.out.println(nextYear);

    What is the result?

    A. 2016-03-01

    B. A DateTimeException is thrown.

    C. 2016-02-29

    D. A compilation error occurs at line n1.

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.