Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Oracle Java SE 1z0-819 Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam 1z0-819 Premium Access

View all detail and faqs for the 1z0-819 exam


658 Students Passed

92% Average Score

98% Same Questions
Viewing page 4 out of 9 pages
Viewing questions 31-40 out of questions
Questions # 31:

Given the code fragment:

Question # 31

Which can replace line 2?

Options:

A.

UnaryOperator u = (int i) -> i * 2;

B.

UnaryOperator u = (var i) -> (i * 2);

C.

UnaryOperator u = var i -> { return i * 2; };

D.

UnaryOperator u = i -> { return i * 2);

Questions # 32:

Given:

Question # 32

What is the result?

Options:

A.

The compilation fails.

B.

1.99,2.99,0

C.

1.99,2.99,0.0

D.

1.99,2.99

Questions # 33:

Given:

Question # 33

What is the result?

Options:

A.

nothing

B.

It fails to compile.

C.

0

D.

A java.lang.IllegalArgumentException is thrown.

E.

10

Questions # 34:

Assuming the Widget class has a getPrice method, this code does not compile:

Question # 34

Which two statements, independently, would allow this code to compile? (Choose two.)

Options:

A.

Replace line 5 with widgetStream.filter(a −> ((Widget)a).getPrice() > 20.00).

B.

Replace line 1 with List widgetStream = widgets.stream();.

C.

Replace line 5 with widgetStream.filter((Widget a) −> a.getPrice() > 20.00).

D.

Replace line 4 with Stream widgetStream = widgets.stream();.

Questions # 35:

Given:

var data = new ArrayList<>();

data.add(“Peter”);

data.add(30);

data.add(“Market Road”);

data.set(1, 25);

data.remove(2);

data.set(3, 1000L);

System.out.print(data);

What is the output?

Options:

A.

[Market Road, 1000]

B.

[Peter, 30, Market Road]

C.

[Peter, 25, null, 1000]

D.

An exception is thrown at run time.

Questions # 36:

Given these classes:

Question # 36

And this code fragment:

Question # 36

What is the result?

Options:

A.

The program prints: A

B.

The program fails to compile.

C.

The program prints: c

D.

The program throws an exception.

Questions # 37:

Given the code fragment:

Question # 37

What is the result?

A)

Question # 37

B)

Question # 37

C)

Question # 37

D)

Question # 37

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions # 38:

Given these declarations:

Question # 38

and these two code fragments:

Fragment 1:

Question # 38

Fragment 2:

Question # 38

Which code fragment is preferred and why?

Options:

A.

Fragment 1 because it is shorter.

B.

Fragment 2 because it prevents SQL injection.

C.

Fragment 2 because it explicitly specifies the SQL types of the column values.

D.

Fragment 1 because it is more performant.

Questions # 39:

Given:

Question # 39

What is the result?

Options:

A.

Green

B.

Mr, Blue

C.

Mr, Green

D.

An exception is thrown at runtime

Questions # 40:

Given:

Question # 40

What is the result?

Options:

A.

A ClassCastException is thrown at runtime.

B.

AnotherClass#methodA()AnotherClass#methodA()

C.

The compilation fails.

D.

SomeClass#methodA()AnotherClass#methodA()

E.

AnotherClass#methodA()SomeClass#methodA()

F.

SomeClass#methodA()SomeClass#methodA()

Viewing page 4 out of 9 pages
Viewing questions 31-40 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.