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

Free Oracle 1z0-819 Practice Exam with Questions & Answers | Set: 2

Questions 11

Given the code fragment:

1z0-819 Question 11

You want to display the value of currency as $100.00.

Which code inserted on line 1 will accomplish this?

Options:
A.

NumberFormat formatter = NumberFormat.getInstance(locale).getCurrency();

B.

NumberFormat formatter = NumberFormat.getCurrency(locale);

C.

NumberFormat formatter = NumberFormat.getInstance(locale);

D.

NumberFormat formatter = NumberFormat.getCurrencyInstance(locale);

Oracle 1z0-819 Premium Access
Questions 12

Given:

1z0-819 Question 12

Which statement on line 1 enables this code fragment to compile?

Options:
A.

Function function = String::toUpperCase;

B.

UnaryOperator function = s −> s.toUpperCase();

C.

UnaryOperator function = String::toUpperCase;

D.

Function function = m −> m.toUpperCase();

Questions 13

Given:

1z0-819 Question 13

What is known about the Sportscar class?

Options:
A.

The Sportscar class is a subclass of Automobile and inherits its methods.

B.

The Sportscar subclass cannot override setTurbo method from the superclass Automobile.

C.

The Sportscar class is a superclass that has more functionality than the Automobile class.

D.

The Sportscar class inherits the setTurbo method from the superclass Automobile.

Questions 14

Given:

1z0-819 Question 14

What must be added in line 1 to compile this class?

Options:
A.

catch(IOException e) { }

B.

catch(FileNotFoundException | IndexOutOfBoundsException e) { }

C.

catch(FileNotFoundException | IOException e) { }

D.

catch(IndexOutOfBoundsException e) { }catch(FileNotFoundException e) { }

E.

catch(FileNotFoundException e) { }catch(IndexOutOfBoundsException e) { }

Questions 15

Given:

1z0-819 Question 15

Which three are correct? (Choose three.)

Options:
A.

b1.foo(li) prints Hello world!

B.

f1.foo(li) prints Bonjour le monde!

C.

f1.foo(li) prints Hello world!

D.

f1.foo(li) prints Hola Mundo!

E.

b1.foo(li) prints Bonjour le monde!

F.

f2.foo(li) prints Hola Mundo!

G.

f2.foo(li) prints Bonjour le monde!

Questions 16

Given:

1z0-819 Question 16

Taking into account that the order of the elements is unpredictable, what is the output?

Options:
A.

{am=2, first=1, mismatch=1, second=2}

B.

{mismatch=2, am=2, first=1, second=1}

C.

{l=mismatch, 2=am}

D.

{mismatch=1, am=2, first=1, second=1}

Questions 17

Why would you choose to use a peek operation instead of a forEach operation on a Stream?

Options:
A.

to process the current item and return void

B.

to remove an item from the end of the stream

C.

to process the current item and return a stream

D.

to remove an item from the beginning of the stream

Questions 18

Given the code fragment:

1z0-819 Question 18

What is the result?

Options:
A.

EUR -> 0.84

GBP -> 0.75

USD -> 1.00

CNY -> 6.42

B.

The compilation fails.

C.

CNY -> 6.42

EUR -> 0.84

GBP -> 0.75

USD -> 1.00

D.

USD -> 1.00

GBP -> 0.75

EUR -> 0.84

CNY -> 6.42

Questions 19

Given:

1z0-819 Question 19

Which two are correct? (Choose two.)

Options:
A.

The output will be exactly 2 1 3 4 5.

B.

The program prints 1 4 2 3, but the order is unpredictable.

C.

Replacing forEach() with forEachOrdered(), the program prints 2 1 3 4 5, but the order is unpredictable.

D.

Replacing forEach() with forEachOrdered(), the program prints 1 2 3 4 5.

E.

Replacing forEach() with forEachOrdered(), the program prints 2 1 3 4 5.

Questions 20

Given:

1z0-819 Question 20

What is the result?

Options:
A.

9

B.

An exception is thrown at runtime.

C.

3

D.

6

Exam Code: 1z0-819
Certification Provider: Oracle
Exam Name: Java SE 11 Developer
Last Update: Jul 11, 2025
Questions: 296