Oracle Java SE 11 Developer (1Z0-819) Free Practice Test
Question 1
Given:

and
checkQuality(QUALITY.A);
and

Which code fragment can be inserted into the switch statement to print Best?

and
checkQuality(QUALITY.A);
and

Which code fragment can be inserted into the switch statement to print Best?
Correct Answer: A
Question 2
Given:

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

Taking into account that the order of the elements is unpredictable, what is the output?
Correct Answer: C
Question 3
Given TripleThis.java:

Compiling TripleThis.java gives this compiler warning:
Note: TripleThis.java uses unchecked or unsafe operations.
Which two replacements done together remove this compiler warning?

Compiling TripleThis.java gives this compiler warning:
Note: TripleThis.java uses unchecked or unsafe operations.
Which two replacements done together remove this compiler warning?
Correct Answer: B,C
Question 4
Which is a proper JDBC URL?
Correct Answer: B
Question 5
Given:

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

Which two codes, independently, can be inserted in line to 1 compile?
Correct Answer: A,D
Question 6
Given:

What is the result?

What is the result?
Correct Answer: A
Question 7
Given:

You want to obtain the Filechannel object on line 1.
Which code fragment will accomplish this?

You want to obtain the Filechannel object on line 1.
Which code fragment will accomplish this?
Correct Answer: D
Question 8
Given:

What is the output?

What is the output?
Correct Answer: A
Question 9
Given this requirement:
Module vehicle depends on module part and makes its com.vehicle package available for all other modules.
Which module-info.java declaration meets the requirement?

Module vehicle depends on module part and makes its com.vehicle package available for all other modules.
Which module-info.java declaration meets the requirement?

Correct Answer: C
Question 10
Given:

and:

Which code, when inserted on line 10, prints the number of unique localities from the roster list?

and:

Which code, when inserted on line 10, prints the number of unique localities from the roster list?
Correct Answer: D
Question 11
Given:

What is the result?

What is the result?
Correct Answer: B
Question 12
Which two commands are used to identify class and module dependencies? (Choose two.)
Correct Answer: B,E
Question 13
Given the directory structure:

What is the result?

What is the result?
Correct Answer: C
Question 14
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?
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?
Correct Answer: A
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 15
Which describes a characteristic of setting up the Java development environment?
Correct Answer: B