Winter Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bigdisc65

1z0-809 Exam Dumps - Oracle Java SE Questions and Answers

Page: 1 / 7
Questions 4

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?

Options:

A.

int GDP = Integer.parseInt (br.readline());

B.

int GDP = br.read();

C.

int GDP = br.nextInt();

D.

int GDP = Integer.parseInt (br.next());

Buy Now
Questions 5

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 + “ “));

Buy Now
Questions 6

Given:

Which two interfaces can you use to create lambda expressions? (Choose two.)

Options:

A.

T

B.

R

C.

P

D.

S

E.

Q

F.

U

Buy Now
Questions 7

Given the code fragment:

What is the result?

Options:

A.

Word: why what when

B.

Word: why Word: why what Word: why what when

C.

Word: why Word: what Word: when

D.

Compilation fails at line n1.

Buy Now
Page: 1 / 7
Exam Code: 1z0-809
Exam Name: Java SE 8 Programmer II
Last Update: Nov 21, 2024
Questions: 196
1z0-809 pdf

1z0-809 PDF

$28  $80
1z0-809 Engine

1z0-809 Testing Engine

$33.25  $95
1z0-809 PDF + Engine

1z0-809 PDF + Testing Engine

$45.5  $130