CertSafari

    Free Practice Questions for Oracle Java SE 21 Developer Professional Certification

    🔄 Last checked for updates September 6th, 2026

    Study with 345 exam-style practice questions designed to help you prepare for the Oracle Java SE 21 Developer Professional.

    Exam experiencesNew

    Pass and fail outcomes from candidates who prepared here — advice, scores, and prep time.

    View exam experiences

    Start Practicing

    All Domains

    Practice with randomly mixed questions from all topics

    Question MixAll Topics
    FormatRandom Order

    Domain Mode

    Practice questions from a specific topic area

    Quiz History

    Exam Details

    Key information about Oracle Java SE 21 Developer Professional

    Official study guide

    View

    Question formats CertSafari offers
    • Multiple choice
    exam format:

    Multiple Choice

    passing score:

    68%

    time limit minutes:

    120 minutes

    number of questions:

    50

    associated certifications:

    Oracle Certified Professional: Java SE 21 Developer

    Exam Topics & Skills Assessed

    Skills measured (from the official study guide)

    Domain 1: Handling Date, Time, Text, Numeric and Boolean Values

    Subdomain 1.1: Use primitives and wrapper classes

    Use primitives and wrapper classes. Evaluate arithmetic and boolean expressions, using the Math API and by applying precedence rules, type conversions, and casting.

    Subdomain 1.2: Manipulate text, including text blocks, using String and StringBuilder classes

    Manipulate text, including text blocks, using String and StringBuilder classes.

    Subdomain 1.3: Manipulate date, time, duration, period, instant and time-zone objects including daylight saving time using Date-Time API

    Manipulate date, time, duration, period, instant and time-zone objects including daylight saving time using Date-Time API.

    Domain 2: Controlling Program Flow

    Subdomain 2.1: Create program flow control constructs including if/else, switch statements and expressions, loops, and break and continue statements

    Create program flow control constructs including if/else, switch statements and expressions, loops, and break and continue statements.

    Domain 3: Using Object-Oriented Concepts in Java

    Subdomain 3.1: Declare and instantiate Java objects including nested class objects, and explain the object life-cycle including creation, reassigning references, and garbage collection

    Declare and instantiate Java objects including nested class objects, and explain the object life-cycle including creation, reassigning references, and garbage collection.

    Subdomain 3.2: Create classes and records, and define and use instance and static fields and methods, constructors, and instance and static initializers

    Create classes and records, and define and use instance and static fields and methods, constructors, and instance and static initializers.

    Subdomain 3.3: Implement overloaded methods, including var-arg methods

    Implement overloaded methods, including var-arg methods.

    Subdomain 3.4: Understand variable scopes, apply encapsulation, and create immutable objects

    Understand variable scopes, apply encapsulation, and create immutable objects. Use local variable type inference.

    Subdomain 3.5: Implement inheritance, including abstract and sealed types as well as record classes

    Implement inheritance, including abstract and sealed types as well as record classes. Override methods, including that of the Object class. Implement polymorphism and differentiate between object type and reference type. Perform reference type casting, identify object types using the instanceof operator, and pattern matching with the instanceof operator and the switch construct.

    Subdomain 3.6: Create and use interfaces, identify functional interfaces, and utilize private, static, and default interface methods

    Create and use interfaces, identify functional interfaces, and utilize private, static, and default interface methods.

    Subdomain 3.7: Create and use enum types with fields, methods, and constructors

    Create and use enum types with fields, methods, and constructors.

    Domain 4: Handling Exceptions

    Subdomain 4.1: Handle exceptions using try/catch/finally, try-with-resources, and multi-catch blocks, including custom exceptions

    Handle exceptions using try/catch/finally, try-with-resources, and multi-catch blocks, including custom exceptions.

    Domain 5: Working with Arrays and Collections

    Subdomain 5.1: Create arrays, List, Set, Map and Deque collections, and add, remove, update, retrieve and sort their elements

    Create arrays, List, Set, Map and Deque collections, and add, remove, update, retrieve and sort their elements.

    Domain 6: Working with Streams and Lambda expressions

    Subdomain 6.1: Use Java object and primitive Streams, including lambda expressions implementing functional interfaces, to create, filter, transform, process, and sort data

    Use Java object and primitive Streams, including lambda expressions implementing functional interfaces, to create, filter, transform, process, and sort data.

    Subdomain 6.2: Perform decomposition, concatenation, and reduction, and grouping and partitioning on sequential and parallel streams

    Perform decomposition, concatenation, and reduction, and grouping and partitioning on sequential and parallel streams.

    Domain 7: Packaging and Deploying Java Code

    Subdomain 7.1: Define modules and expose module content, including that by reflection, and declare module dependencies, define services, providers, and consumers

    Define modules and expose module content, including that by reflection, and declare module dependencies, define services, providers, and consumers.

    Subdomain 7.2: Compile Java code, create modular and non-modular jars, runtime images, and implement migration to modules using unnamed and automatic modules

    Compile Java code, create modular and non-modular jars, runtime images, and implement migration to modules using unnamed and automatic modules.

    Domain 8: Managing Concurrent Code Execution

    Subdomain 8.1: Create both platform and virtual threads

    Create both platform and virtual threads. Use both Runnable and Callable objects, manage the thread lifecycle, and use different Executor services and concurrent API to run tasks.

    Subdomain 8.2: Develop thread-safe code, using locking mechanisms and concurrent API

    Develop thread-safe code, using locking mechanisms and concurrent API.

    Subdomain 8.3: Process Java collections concurrently and utilize parallel streams

    Process Java collections concurrently and utilize parallel streams.

    Domain 9: Using Java I/O API

    Subdomain 9.1: Read and write console and file data using I/O streams

    Read and write console and file data using I/O streams.

    Subdomain 9.2: Serialize and de-serialize Java objects

    Serialize and de-serialize Java objects.

    Subdomain 9.3: Construct, traverse, create, read, and write Path objects and their properties using the java.nio.file API

    Construct, traverse, create, read, and write Path objects and their properties using the java.nio.file API.

    Domain 10: Implementing Localization

    Subdomain 10.1: Implement localization using locales and resource bundles

    Implement localization using locales and resource bundles. Parse and format messages, dates, times, and numbers, including currency and percentage values.

    Domain 11: Candidates are also expected to

    Subdomain 11.1: Understand the basics of Java Logging API

    Understand the basics of Java Logging API.

    Subdomain 11.2: Use Annotations such as Override, FunctionalInterface, Deprecated, SuppressWarnings, and SafeVarargs

    Use Annotations such as Override, FunctionalInterface, Deprecated, SuppressWarnings, and SafeVarargs.

    Subdomain 11.3: Use generics, including wildcards

    Use generics, including wildcards.

    Techniques & products

    Java SE 21
    Java programming language
    Math API
    String class
    StringBuilder class
    Date-Time API
    if/else statements
    switch statements
    loops
    break statements
    continue statements
    Java objects
    nested classes
    garbage collection
    classes
    records
    fields
    methods
    constructors
    initializers
    overloaded methods
    var-arg methods
    variable scopes
    encapsulation
    immutable objects
    local variable type inference
    inheritance
    abstract types
    sealed types
    polymorphism
    Object class
    instanceof operator
    pattern matching
    interfaces
    functional interfaces
    enum types
    exception handling
    try/catch/finally
    try-with-resources
    multi-catch blocks
    custom exceptions
    arrays
    List
    Set
    Map
    Deque
    Java Collections Framework
    Java Streams API
    lambda expressions
    sequential streams
    parallel streams
    Java modules
    reflection
    JARs
    runtime images
    platform threads
    virtual threads
    Runnable
    Callable
    Executor services
    Concurrent API
    locking mechanisms
    Java I/O API
    I/O streams
    object serialization
    java.nio.file API
    Path objects
    localization
    locales
    resource bundles
    Java Logging API
    Annotations
    generics
    wildcards

    CertSafari is not affiliated with, endorsed by, or officially connected to Oracle. Full disclaimer