IT Certifications · 1Z0-819

Oracle Java SE 11 Developer (also available in CHS for Taiwan) Exam Practice Test

The Oracle Java SE 11 Developer practice page focuses on interpreting Java code and applying language and library features. Its question bank samples functional interfaces, arrays, `final` local variables, access modifiers, enums, loop control, `HashMap`, `Set`, and loading properties from a `Reader`.

Exam overview

Exam providerOracle
Exam code1Z0-819
CategoryIT Certifications

About the Oracle Java SE 11 Developer (also available in CHS for Taiwan) Exam

Java development requires reasoning about how declarations, expressions, and control flow affect program behavior. Practice tracing loops with `break` or `continue`, identifying array length, and distinguishing what can be assigned to a `final` local variable. Object-oriented questions involve access control and enum constructors; collection questions test the behavior of maps and sets. Functional-interface knowledge supports work with lambda expressions and compatible method signatures. Properties-loading questions connect API selection with text input handling. These skills help developers read unfamiliar code, select appropriate Java constructs, and predict outcomes before changing or debugging an application. The listed topics describe the available practice bank’s sample, not a verified exam outline.

Sample Practice Questions

Review a selection from this exam's published US Practice Tests practice bank.

Question 1

Which statement about `Properties.load(Reader)` is correct?

  1. AIt reads property entries from a character-based `Reader`.
  2. BIt reads only XML documents and rejects ordinary property syntax.
  3. CIt closes the supplied `Reader` automatically in all cases.
  4. DIt stores every property value as an integer.
Show answerCorrect answer: A

`Properties.load(Reader)` loads properties from a character stream using the properties-file syntax. The caller remains responsible for managing the reader, and property keys and values are strings.

Question 2

What is the output of this code?

  1. A1
  2. B2
  3. C3
  4. DCompilation fails
Show answerCorrect answer: B

The post-increment expression supplies the current value of x, which is 1, and then increments x. The next statement prints the updated value, 2.

Question 3

Which statement correctly describes a functional interface in Java?

  1. AIt must declare exactly one method of any kind, including default methods.
  2. BIt has one abstract method that is not a public method of `Object`; it may also have default or static methods.
  3. CIt cannot be annotated with `@FunctionalInterface` if it extends another interface.
  4. DIt must be implemented with a lambda expression.
Show answerCorrect answer: B

A functional interface has exactly one abstract method, excluding methods that match public methods of `Object`. It may contain other kinds of methods, and it can be implemented by a class or used as a lambda target. The annotation is optional but helps detect mistakes.

Question 4

Given `int[] values = {4, 7, 9};`, which expression evaluates to the number of elements in the array?

  1. A`values.length()`
  2. B`values.size()`
  3. C`values.length`
  4. D`length(values)`
Show answerCorrect answer: C

Arrays expose their element count through the `length` field, written without parentheses. Methods such as `size()` are used by many collection types, not arrays.

Question 5

Which statement about `final` local variables in Java is correct?

  1. AA `final` local variable must be assigned exactly once before it is read.
  2. BA `final` local variable can be assigned repeatedly until the method returns.
  3. CA `final` local variable is implicitly `static`.
  4. DA `final` local variable cannot refer to an object.
Show answerCorrect answer: A

A final local variable may be assigned once, either at its declaration or later, and must be definitely assigned before use. If it refers to an object, the reference cannot be reassigned, though the object's state may still be mutable.

Question 6

Which statement about a Java `HashMap` is correct?

  1. AIt preserves entries in the order they were inserted.
  2. BIt permits a null key and null values, and it does not guarantee iteration order.
  3. CIt rejects all null keys and values.
  4. DIt sorts entries by key during iteration.
Show answerCorrect answer: B

`HashMap` permits one null key and multiple null values. Its iteration order is not guaranteed to be insertion order or sorted order. Other map implementations provide different ordering guarantees.

Question 7

Which statement about Java access modifiers is correct?

  1. AA `private` top-level class can be declared in an ordinary source file.
  2. BA `protected` member is accessible to code in the same package, as well as under subclass access rules.
  3. CA package-private member is accessible from every package in the same module.
  4. DA `public` member is accessible only to classes in its declaring package.
Show answerCorrect answer: B

A protected member is accessible within its package and also to subclasses subject to Java's protected-access rules. Top-level classes cannot be declared `private`, and package-private access is limited to the package rather than the whole module.

How to use this practice test

Access is free. The practice session presents up to 20 random questions from the 50-question bank, then shows your results. Use missed items to identify whether the gap is code tracing, language rules, or API behavior, and revisit those concepts before another session.

Preparation tips

  • Trace each loop iteration in a small table, recording changes to variables and the effect of `continue` or `break`.
  • Write short examples with `final` locals, access modifiers, and enum constructors; check which assignments and references compile.
  • Compare `HashMap` and `Set` behavior using examples with duplicate keys, duplicate elements, and lookup operations.
  • Practice defining a functional interface and matching a lambda expression to its abstract method signature.
  • Test `Properties.load(Reader)` with a `StringReader` and distinguish character-stream input from byte-stream input.
Official sourceOfficial exam page ↗