CertSafari

    Free Practice Questions for Oracle Java SE 21 Developer Professional Certification

    Guide checked for updates:
    9 Oct 2026
    Question bank created:
    6 Sep 2026
    Question bank last updated:
    7 Sep 2026

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

    Your progress

    Coverage
    Mastery
    Performance

    Start Practicing

    Start a quiz

    Practice with randomly mixed questions from all topics

    Question MixAll Topics
    FormatRandom Order

    Exam experiences

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

    Your saved questions

    Open the list of questions you bookmarked during practice for this exam.

    Study notes

    Private notes per question, grouped by exam domain — opens on its own page, not inline on this overview.

    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)

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

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

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

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

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

    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.

    2: Controlling Program Flow

    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.

    3: Using Object-Oriented Concepts in Java

    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.

    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.

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

    Implement overloaded methods, including var-arg methods.

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

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

    3.5: 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.

    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.

    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.

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

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

    4: Handling Exceptions

    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.

    5: Working with Arrays and Collections

    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.

    6: Working with Streams and Lambda expressions

    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.

    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.

    7: Packaging and Deploying Java Code

    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.

    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.

    8: Managing Concurrent Code Execution

    8.1: 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.

    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.

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

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

    8.3: Process Java collections concurrently and utilize parallel streams.

    Process Java collections concurrently and utilize parallel streams.

    9: Using Java I/O API

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

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

    9.2: Serialize and de-serialize Java objects.

    Serialize and de-serialize Java objects.

    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.

    10: Implementing Localization

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

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

    11: Candidates are also expected to

    11.1: Understand the basics of Java Logging API.

    Understand the basics of Java Logging API.

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

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

    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