Summer Special Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: big60

Oracle Updated 1z0-809 Exam Questions and Answers by zayne

Page: 13 / 15

Oracle 1z0-809 Exam Overview :

Exam Name: Java SE 8 Programmer II
Exam Code: 1z0-809 Dumps
Vendor: Oracle Certification: Java SE
Questions: 208 Q&A's Shared By: zayne
Question 52

Given the code fragments:

public class Book implements Comparator {

String name;

double price;

public Book () {}

public Book(String name, double price) {

this.name = name;

this.price = price;

}

public int compare(Book b1, Book b2) {

return b1.name.compareTo(b2.name);

}

public String toString() {

return name + “:” + price;

}

}

and

Listbooks = Arrays.asList (new Book (“Beginning with Java”, 2), new book (“A

Guide to Java Tour”, 3));

Collections.sort(books, new Book());

System.out.print(books);

What is the result?

Options:

A.

[A Guide to Java Tour:3.0, Beginning with Java:2.0]

B.

[Beginning with Java:2, A Guide to Java Tour:3]

C.

A compilation error occurs because the Book class does not override the abstract method compareTo().

D.

An Exception is thrown at run time.

Discussion
Question 53

Given the code fragment:

List list1 = Arrays.asList(10, 20);

List list2 = Arrays.asList(15, 30);

//line n1

Which code fragment, when inserted at line n1, prints 10 20 15 30?

Options:

A.

Stream.of(list1, list2).flatMap(list -> list.stream()).forEach(s -> System.out.print(s + “ “));

B.

Stream.of(list1, list2).flatMap(list -> list.intStream()).forEach(s -> System.out.print(s + “ “));

C.

list1.stream().flatMap(list2.stream().flatMap(e1 -> e1.stream()).forEach(s -> System.out.println(s + “ “));

D.

Stream.of(list1, list2).flatMapToInt(list -> list.stream()).forEach(s -> System.out.print(s + “ “));

Discussion
Question 54

What is true about the java.sql.Statement interface?

Options:

A.

It provides a session with the database.

B.

It is used to get an instance of a Connection object by using JDBC drivers.

C.

It provides a cursor to fetch the resulting data.

D.

It provides a class for executing SQL statements and returning the results.

Discussion
Carson
Yeah, definitely. I would definitely recommend Cramkey Dumps to anyone who is preparing for an exam.
Rufus Sep 9, 2025
Me too. They're a lifesaver!
Addison
Want to tell everybody through this platform that I passed my exam with excellent score. All credit goes to Cramkey Exam Dumps.
Libby Sep 5, 2025
That's good to know. I might check it out for my next IT certification exam. Thanks for the info.
Faye
Yayyyy. I passed my exam. I think all students give these dumps a try.
Emmeline Sep 15, 2025
Definitely! I have no doubt new students will find them to be just as helpful as I did.
Victoria
Hey, guess what? I passed the certification exam! I couldn't have done it without Cramkey Dumps.
Isabel Sep 18, 2025
Same here! I was so surprised when I saw that almost all the questions on the exam were exactly what I found in their study materials.
Question 55

Given the code fragment:

List nL = Arrays.asList(“Jim”, “John”, “Jeff”);

Function funVal = s -> “Hello : “.contact(s);

nL.Stream()

.map(funVal)

.peek(System.out::print);

What is the result?

Options:

A.

Hello : Jim Hello : John Hello : Jeff

B.

Jim John Jeff

C.

The program prints nothing.

D.

A compilation error occurs.

Discussion
Page: 13 / 15

1z0-809
PDF

$42  $104.99

1z0-809 Testing Engine

$50  $124.99

1z0-809 PDF + Testing Engine

$66  $164.99