All Practice Exams

100+ Free Java SE 11 Developer Practice Questions

Pass your Oracle Certified Professional: Java SE 11 Developer (Exam 1Z0-819) exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
100+ Questions
100% Free
1 / 100
Question 1
Score: 0/0

What is the correct order of the core JDBC objects obtained when running a query?

A
B
C
D
to track
2026 Statistics

Key Facts: Java SE 11 Developer Exam

$245

Exam Fee (USD)

Oracle

~68%

Passing Score

Oracle

90 min

Exam Duration

Oracle

~50

Question Count

Oracle

1Z0-815 + 1Z0-816

Exams Replaced by 1Z0-819

Oracle

No expiration

Credential Validity

Oracle

Oracle's Exam 1Z0-819 grants the Oracle Certified Professional: Java SE 11 Developer credential and is the single exam that replaced 1Z0-815 plus 1Z0-816. It costs $245 USD, presents about 50 multiple-choice and multiple-select questions in 90 minutes, and requires roughly a 68% score to pass. It is delivered through Pearson VUE, online proctored or at a test center, and the certification does not expire. The code-heavy blueprint spans Java data types and operators, program flow, the object-oriented approach, exception handling, arrays and collections with generics, streams and lambda expressions, the Java Platform Module System, concurrency, JDBC, localization, annotations, secure coding, and NIO.2 I/O.

Sample Java SE 11 Developer Practice Questions

Try these sample questions to test your Java SE 11 Developer exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1Given: var list = new ArrayList<String>(); list.add("a"); Which statement about the use of var on the first line is correct?
A.var infers the raw type ArrayList, so list.add("a") fails to compile.
B.var is illegal here because the right side uses a diamond operator.
C.var infers the type as ArrayList<String>, so list.add("a") compiles.
D.var requires an explicit type argument such as var<String>.
Explanation: Local variable type inference (var) infers the static type from the initializer. The initializer new ArrayList<String>() has type ArrayList<String>, so list is inferred as ArrayList<String> and list.add("a") compiles. var is only allowed for local variables with an initializer.
2What is the result of compiling and running: public class Main { public static void main(String[] args) { int x = 5; int y = x++ + ++x; System.out.println(y); } }
A.10
B.11
C.13
D.12
Explanation: x++ evaluates to 5 (post-increment returns the old value, then x becomes 6). ++x then makes x 7 and evaluates to 7. So y = 5 + 7 = 12.
3Which expression correctly tests whether the int variable n is between 10 and 20 inclusive?
A.10 <= n <= 20
B.n >= 10 && n <= 20
C.n >= 10 & n <= 20 || false
D.10 < n < 20
Explanation: Java has no chained relational comparison; you must combine two comparisons with a logical operator. n >= 10 && n <= 20 is the correct, idiomatic inclusive range test and short-circuits on the first false comparison.
4Given: String s = "Hello"; s.concat(" World"); System.out.println(s); What is printed?
A.Hello
B.Hello World
C.World
D.A compilation error occurs.
Explanation: String is immutable. concat returns a new String but does not change the original; because the returned value is discarded, s still references "Hello". The output is Hello.
5Which Java 11 String method returns true for the string " " (three spaces) and false for "a"?
A.isEmpty()
B.strip()
C.isBlank()
D.length() == 0
Explanation: isBlank(), added in Java 11, returns true if the string is empty or contains only white space code points. " ".isBlank() is true and "a".isBlank() is false.
6Given: StringBuilder sb = new StringBuilder("Java"); sb.insert(2, "XX"); sb.delete(0, 2); System.out.println(sb); What is the result?
A.vaXX
B.JaXXva
C.XXJava
D.XXva
Explanation: Starting with "Java", insert(2, "XX") produces "JaXXva". delete(0, 2) removes indices 0 and 1 (the "Ja"), leaving "XXva".
7Which assignment requires an explicit cast to compile?
A.long l = 100;
B.double d = 5;
C.int i = 3.0;
D.float f = 1L;
Explanation: int i = 3.0 fails without a cast because double-to-int is a narrowing conversion that may lose precision; the compiler requires (int) 3.0. The other assignments are widening conversions, which are implicit.
8Given: Integer a = 127, b = 127; Integer c = 128, d = 128; System.out.println((a == b) + " " + (c == d)); What is printed on a standard JVM?
A.true true
B.false false
C.true false
D.false true
Explanation: Integer caching via Integer.valueOf caches values from -128 to 127, so a and b reference the same cached object and a == b is true. 128 is outside the cache, so c and d are distinct objects and c == d is false.
9What is the value of result? int result = 17 % 5;
A.2
B.3
C.3.4
D.12
Explanation: The % operator returns the remainder of integer division. 17 divided by 5 is 3 with a remainder of 2, so 17 % 5 evaluates to 2.
10Given: var x = 10; var y = (x > 5) ? "big" : 0; What type is inferred for y, and does the code compile?
A.It compiles; y is inferred as Comparable<? extends Comparable<...>> & Serializable.
B.It compiles; y is inferred as String.
C.It does not compile because the two branches have unrelated types.
D.It compiles; y is inferred as Object.
Explanation: A conditional expression whose branches are a String and an int (autoboxed to Integer) has a least upper bound (lub) type combining the common supertypes and interfaces of String and Integer, such as Comparable and Serializable. var infers this intersection type, so it compiles.

About the Java SE 11 Developer Exam

Exam 1Z0-819 leads to the Oracle Certified Professional: Java SE 11 Developer credential and is the single exam that replaced the former two-exam path of 1Z0-815 (Programmer I) and 1Z0-816 (Programmer II). It validates broad proficiency across the Java SE 11 language and core APIs, including object-oriented design, generics and collections, functional programming with streams and lambdas, the Java Platform Module System, concurrency with ExecutorService, exception handling, JDBC, localization, secure coding, and the NIO.2 file API. Questions are heavily code-based, asking candidates to predict output, identify compilation errors, and choose correct API usage. The certification does not expire.

Questions

50 scored questions

Time Limit

90 minutes

Passing Score

Approximately 68%

Exam Fee

$245 (Oracle)

Java SE 11 Developer Exam Content Outline

~11%

Working with Java Data Types, Operators, and String APIs

Use primitives and wrapper classes with operators, type promotion, and casting; handle text with String and StringBuilder, including Java 11 methods like isBlank and strip; and apply local variable type inference (var), including as a lambda parameter.

~7%

Controlling Program Flow

Create and use loops, if/else, and switch statements, including the enhanced for loop, labeled break and continue, do-while semantics, and String selectors in traditional switch.

~18%

Java Object-Oriented Approach

Declare and instantiate objects and nested classes; define fields, methods, constructors, and initializers; and apply inheritance, polymorphism, method hiding, interfaces with default methods, abstract classes, enums, and inner/anonymous classes.

~8%

Exception Handling

Use try/catch/finally, multi-catch with effectively final parameters, and try-with-resources on AutoCloseable resources; create custom checked and unchecked exceptions; and apply the checked-versus-unchecked rules.

~11%

Working with Arrays and Collections

Create and manipulate arrays (including jagged arrays), List, Set, Map, and Deque; use generics, bounded type parameters, and wildcards; sort with Comparator chains; and use immutable factory methods such as List.of and Map.getOrDefault.

~14%

Working with Streams and Lambda Expressions

Use lambdas, method references, and standard functional interfaces; build pipelines with filter, map, flatMap, reduce, and Collectors such as groupingBy and joining; use Optional and function composition; and understand stream laziness, short-circuiting, and single-use traversal.

~9%

Java Platform Module System

Declare modules with requires, requires transitive, exports, opens, uses, and provides...with; build modular and service-based applications; understand java.base, automatic modules, and open modules; and use migration tools like jdeps and jlink.

~8%

Concurrency

Create and manage threads; use ExecutorService, Runnable, Callable, and Future; apply synchronization and monitors, AtomicInteger, concurrent collections such as ConcurrentHashMap, and thread-pool factory methods, including correct shutdown semantics.

~6%

Java I/O API and NIO.2

Read and write console and file data with I/O streams and buffered readers; serialize and deserialize objects with transient and static field rules; and handle the file system with the java.nio.file Path and Files APIs.

~9%

Database Applications, Localization, and Annotations

Use the JDBC API with Connection, PreparedStatement, ResultSet, and executeUpdate; apply Locale, resource bundles, NumberFormat, MessageFormat, and DateTimeFormatter; and use core annotations such as @Override, @FunctionalInterface, @Deprecated(forRemoval), and @SuppressWarnings.

~4%

Secure Coding in Java SE Applications

Mitigate threats such as denial of service, code injection, and improper input validation; defend against SQL injection with parameterized PreparedStatements; use defensive copying to protect mutable state; and store secrets in char arrays rather than immutable Strings.

How to Pass the Java SE 11 Developer Exam

What You Need to Know

  • Passing score: Approximately 68%
  • Exam length: 50 questions
  • Time limit: 90 minutes
  • Exam fee: $245

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

Java SE 11 Developer Study Tips from Top Performers

1Treat every question as a code-reading exercise: trace execution line by line, watch for compilation errors first, and only then evaluate runtime output.
2Drill the heaviest areas hardest: object-oriented design (inheritance, polymorphism, method hiding, default-method conflicts), generics and collections, and the Stream API with Collectors and Optional.
3Master local variable type inference (var) rules, including where it is allowed (locals, enhanced-for, lambda parameters) and where it is not (fields, method parameters, return types).
4Practice the Java Platform Module System until requires/requires transitive, exports, opens, uses, and provides...with are second nature, and know automatic modules, open modules, and tools like jdeps and jlink.
5Memorize the exception rules: checked versus unchecked, multi-catch effectively final parameters, try-with-resources close ordering, and the pitfall that a return in finally overrides the try block.
6Get comfortable with JDBC (Connection, PreparedStatement, ResultSet, executeUpdate), NIO.2 Path/Files, localization (Locale, ResourceBundle, NumberFormat), and secure-coding practices such as parameterized queries and defensive copying.

Frequently Asked Questions

What are the current exam facts for 1Z0-819?

Oracle's Exam 1Z0-819 costs $245 USD, presents about 50 multiple-choice and multiple-select questions in 90 minutes, and requires roughly a 68% score to pass. It is delivered through Pearson VUE, online proctored or at a test center, and the resulting certification does not expire.

Did 1Z0-819 replace 1Z0-815 and 1Z0-816?

Yes. Exam 1Z0-819 is the single exam that combined and replaced the former two-exam path of Java SE 11 Programmer I (1Z0-815) and Programmer II (1Z0-816), so one exam now earns the OCP Java SE 11 Developer credential.

What does the 1Z0-819 exam cover?

The code-heavy blueprint spans Java data types and operators, program flow, the object-oriented approach, exception handling, arrays and collections with generics, streams and lambdas, the Java Platform Module System, concurrency, JDBC, localization, annotations, secure coding, and NIO.2 I/O.

Which topics carry the most weight on 1Z0-819?

Oracle does not publish per-objective percentages, but the Java Object-Oriented Approach, Working with Streams and Lambda Expressions, and Arrays and Collections areas are widely regarded as the heaviest, so candidates should drill OO design, generics, and the Stream API hardest.

Does the Java SE 11 Developer certification expire?

No. Unlike some role-based certifications, the Oracle Certified Professional: Java SE 11 Developer credential earned through 1Z0-819 does not expire, though candidates often upgrade later to newer LTS releases such as Java SE 17 or 21.

What is the best way to prepare for 1Z0-819?

Write and run real Java 11 code: predict program output, hunt compilation errors, and master tricky areas like var inference, default-method conflicts, try-with-resources, JPMS module directives, and stream short-circuiting. Hands-on coding beats memorization on this exam.