Pass4itsure > Oracle > Oracle Java > 1Z0-816 > 1Z0-816 Online Practice Questions and Answers

1Z0-816 Online Practice Questions and Answers

Questions 4

Which two are functional interfaces? (Choose two.)

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

Buy Now
Questions 5

Given the declaration:

Examine this code fragment:

/* Loc1 */ class ProcessOrders { ... }

Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)

A. @Resource(priority=100)

B. @Resource(priority=0)

C. @Resource(name="Customer1", priority=100)

D. @Resource(name="Customer1")

E. @Resource

Buy Now
Questions 6

Given: Which one is correct?

A. An IllegalThreadStateException is thrown at run time.

B. Three threads are created.

C. The compilation fails.

D. Four threads are created.

Buy Now
Questions 7

Given:

You want to use the myResource class in a try-with-resources statement. Which change will accomplish this?

A. Extend AutoCloseable and override the close method.

B. Implement AutoCloseable and override the autoClose method.

C. Extend AutoCloseable and override the autoClose method.

D. Implement AutoCloseable and override the close method.

Buy Now
Questions 8

Given:

Which two are correct? (Choose two.)

A. Option A

B. Option B

C. Option C

D. Option D

E. Option E

Buy Now
Questions 9

Given: String originalPath = "data\\projects\\a-project\\..\\..\\another-project"; Path path = Paths.get(originalPath); System.out.print(path.normalize());

What is the result?

A. data\another-project

B. data\projects\a-project\another-project

C. data\\projects\\a-project\\..\\..\\another-project

D. data\projects\a-project\..\..\another-project

Buy Now
Questions 10

Given the Person class with age and name along with getter and setter methods, and this code fragment:

What will be the result?

A. Aman Tom Peter

B. Tom Aman Peter

C. Aman Peter Tom

D. Tom Peter Aman

Buy Now
Questions 11

Which two statements set the default locale used for formatting numbers, currency, and percentages? (Choose two.)

A. Locale.setDefault(Locale.Category.FORMAT, "zh-CN");

B. Locale.setDefault(Locale.Category.FORMAT, Locale.CANADA_FRENCH);

C. Locale.setDefault(Locale.SIMPLIFIED_CHINESE);

D. Locale.setDefault("en_CA");

E. Locale.setDefault("es", Locale.US);

Buy Now
Questions 12

Which two statements independently compile? (Choose two.)

A. List list = new ArrayList();

B. List list = new ArrayList();

C. List list = new ArrayList();

D. List list = new ArrayList();

E. List list = new ArrayList();

Buy Now
Questions 13

Given:

jdeps -jdkinternals C:\workspace4\SimpleSecurity\jar\classes.jar

Which describes the expected output?

A. jdeps lists the module dependencies and the package names of all referenced JDK internal APIs. If any are found, the suggested replacements are output in the console.

B. jdeps outputs an error message that the -jdkinternals option requires either the -summary or the verbose options to output to the console.

C. The -jdkinternals option analyzes all classes in the .jar and prints all class-level dependencies.

D. The -jdkinternals option analyzes all classes in the .jar for class-level dependencies on JDK internal APIs. If any are found, the results with suggested replacements are output in the console.

Buy Now
Exam Code: 1Z0-816
Exam Name: Java SE 11 Programmer II
Last Update: Dec 13, 2024
Questions: 80
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99