1z0-816 Sample Questions & Answers
Walks through generics and the collections framework, Stream API pipelines, lambda expressions, migrating to modular applications, concurrency, secure coding, JDBC, plus nested classes, enumerations, interface methods, assertions, and annotations.
Launch the full 1z0-816 simulator →Showing 6 of 12 free samples.
- Question 1
Which is a proper JDBC URL?
Show answer & explanation
Correct answer: D
- Question 2
Which code fragment does a service use to load the service provider with a Print interface?
Show answer & explanation
Correct answer: B
- Question 3
Given:
You want to obtain the Stream object on reading the file.
Which code inserted on line 1 will accomplish this?

Show answer & explanation
Correct answer: C
C
- Question 4
Given:
Which option should you choose to enable the code to print Something happened?

Show answer & explanation
Correct answer: D
D
- Question 5
Given the contents:
MessageBundle.properties file: message=Hello
MessageBundle_en.properties file:
message=Hello (en)
MessageBundle_US.properties file:
message=Hello (US)
MessageBundle_en_US.properties file:
message=Hello (en_US)
MessageBundle_fr_FR.properties file: message=Bonjour
and the code fragment:
Locale.setDefault(Locale. FRANCE);
Locale currentLocale = new Locale.Builder().setLanguage(“en”).build();
ResourceBundle messages = ResourceBundle.getBundle(“MessageBundle”, currentLocale);
System.out. println(messages.getString(“message”));
Which file will display the content on executing the code fragment?Show answer & explanation
Correct answer: C
- Question 6Select 3
Which three annotation uses are valid? (Choose three.)
Show answer & explanation
Correct answers: A, C, F
A, C, F
A, C, F
A, C, F
Ready for the real thing?
The full 1z0-816 simulator has every exam-style question, timed mode, and instant scoring.