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

1z0-819 Exam Dumps - Java SE 11 Developer

Go to page:
Question # 4

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?

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.

Full Access
Question # 5

What change will cause the code to compile successfully?

A.

Insert PriceChecker (?) prod on line 1.

B.

Insert PriceChecker <> prod on line 1.

C.

Insert PriceChecker prod on line 1.

D.

Insert PriceChecker prod on line 1.

Full Access
Question # 6

Given the code fragment:

What is the result?

A.

A java.lang, UnsupportedOperationException is thrown.

B.

True

C.

False

D.

A java.lang.NullPointerException is thrown.

Full Access
Question # 7

Given the code fragment:

What is the result?

A.

23

B.

12

C.

123

D.

13

Full Access
Question # 8

Given:

What is the result?

A.

The compilation fails.

B.

abdf

C.

abd

D.

adf

E.

abcd

Full Access
Go to page: