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 2 out of 9 pages
Viewing questions 11-20 out of questions
Questions # 11:

Given the code fragment:

Path currentFile = Paths.get(“/scratch/exam/temp.txt”);

Path outputFile = Paths get(“/scratch/exam/new.txt”);

Path directory = Paths.get(“/scratch/”);

Files.copy(currentFile, outputFile);

Files.copy(outputFile, directory);

Files.delete (outputFile);

The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist.

What is the result?

Options:

A.

/scratch/exam/new.txt and /scratch/new.txt are deleted.

B.

The program throws a FileaAlreadyExistsException.

C.

The program throws a NoSuchFileException.

D.

A copy of /scratch/exam/new.txt exists in the /scratch directory and /scratch/exam/new.txt is deleted.

Questions # 12:

Given:

Question # 12

Which two codes, independently, can be inserted in line to 1 compile?

Options:

A.

Abacus aba = (int m, int n) -> { m * n };

B.

Abacus aba = (int e, int f) -> { return e * f; };

C.

Abacus aba = (a, b) -> a * b;

D.

Abacus aba = v, w -> x * y;

E.

Abacus aba = (int i, j) -> ( return i * j; };

Questions # 13:

Given:

Question # 13

You want to examine the items list it contains an item for which the variable count is below zero.

Which code fragment at line 1 accomplish this?

Options:

A.

If (items.stream () .filter (i -> count < 0) . findFirst () ) {

B.

If (items.stream () .filter (i -> count < 0) . findAny () ) {

C.

If (items.stream () .allmatch (i -> count < 0) < 0) ) {

D.

If (items.stream () .anymatch (i -> count < 0) < 0) ) {

Questions # 14:

Given:

Question # 14

What is required to make the Foo class thread safe?

Options:

A.

No change is required.

B.

Make the declaration of lock static.

C.

Replace the lock constructor call with new ReentrantLock (true).

D.

Move the declaration of lock inside the foo method.

Questions # 15:

Given the code fragment:

Which two code snippets inserted independently inside println method print Mondial:domainmodel? (Choose two.)

Options:

A.

Main.prefix + Main.name

B.

prefix + getName

C.

Main.prefix + Main.getName()

D.

new Main().prefix + new Main().name

E.

prefix + name

F.

prefix + Main.name

Questions # 16:

Given:

Question # 16

Which statement is true?

Options:

A.

Class Tester does not need to import java.time.LocalDate because it is already visible to members of the package test.

B.

All classes from the package java.time. are loaded for the class Diary.

C.

Only LocalDate class from java.time package is loaded.

D.

Tester must import java.time.LocalDate in order to compile.

Questions # 17:

Given:

Question # 17

If file "App.config" is not found, what is the result?

Options:

A.

Configuration is OK

B.

The compilation fails.

C.

Exception in thread "main" java.lang.Error:Fatal Error: Configuration File, App.config, is missing.

D.

nothing

Questions # 18:

Given the code fragment:

Question # 18

What is the result?

Options:

A.

2

B.

-1

C.

1

D.

-3

Questions # 19:

Given:

Question # 19

What is the result?

Options:

A.

[0,0] = Red[0,1] = White[1,0] = Black[1,1] = Blue[2,0] = Yellow[2,1] = Green[3,0] = Violet

B.

[0,0] = Red[1,0] = Black[2,0] = Blue

C.

java.lang.ArrayIndexOutOfBoundsException thrown

D.

[0,0] = Red[0,1] = White[1,0] = Black[2,0] = Blue[2,1] = Yellow[2,2] = Green[2,3] = Violet

Questions # 20:

Given:

Question # 20

What is the result?

Options:

A.

Map: 0 Keys: 0 Values: 0

B.

The compilation fails.

C.

Map: 4 Keys: 4 Values: 4

D.

Map: 4 Keys: 0 Values: 0

E.

Map: 0 Keys: 4 Values: 4

Viewing page 2 out of 9 pages
Viewing questions 11-20 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.