Black Friday Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

1z0-809 Leak Questions

Page: 5 / 7
Total 196 questions

Java SE 8 Programmer II Questions and Answers

Question 17

Given the code fragment:

List values = Arrays.asList (1, 2, 3);

values.stream ()

.map(n -> n*2)//line n1

.peek(System.out::print)//line n2

.count();

What is the result?

Options:

A.

246

B.

The code produces no output.

C.

A compilation error occurs at line n1.

D.

A compilation error occurs at line n2.

Question 18

Given the code fragments:

and

What is the result?

Options:

A.

null

B.

A compilation error occurs.

C.

DogCatMouse

D.

[Dog, Cat, Mouse]

Question 19

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 () { }

}

public interface Drawable {

public abstract void draw ();

}

Which statement is true?

Options:

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 20

and the code fragment?

What is the result?

Options:

A.

$15.00

B.

15 $

C.

USD 15.00

D.

USD $15

Page: 5 / 7
Total 196 questions