1Z0-830 Exam Details

  • Exam Code
    :1Z0-830
  • Exam Name
    :Java SE 21 Developer Professional
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :95 Q&As
  • Last Updated
    :Jan 17, 2026

Oracle 1Z0-830 Online Questions & Answers

  • Question 1:

    What is the output?

    var map = new HashMap();

    map.put("A", 1);

    map.merge("A", 2, Integer::sum);

    map.merge("B", 3, Integer::sum);

    System.out.println(map);

    A. {A=3, B=3}
    B. {A=2, B=3}
    C. {A=1, B=3}
    D. {A=3}

  • Question 2:

    Given:

    var list = List.of(1,2,3,4,5);

    System.out.println(list.stream().dropWhile(i -> i < 3)

    .takeWhile(i -> i < 5)

    .toList());

    What is printed?

    A. [3, 4]
    B. [1, 2, 3, 4]
    C. [4, 5]
    D. []

  • Question 3:

    Consider:

    List names = List.of("Bob","Alice","Eve");

    var sorted = names.stream()

    .sorted(Comparator.comparing(String::length).reversed()

    .thenComparing(Comparator.naturalOrder()))

    .toList();

    System.out.println(sorted);

    What is printed?

    A. [Eve, Bob, Alice]
    B. [Alice, Eve, Bob]
    C. [Alice, Bob, Eve]
    D. [Bob, Eve, Alice]

  • Question 4:

    Given:

    record Box(T value) {}

    public static void main(String[] args) {

    Box b = new Box(10);

    System.out.println(b.value().doubleValue());

    }

    What is printed?

    A. 10.0
    B. Compilation fails
    C. A ClassCastException
    D. null

  • Question 5:

    Which statement about sealed interfaces and records is correct?

    A. A record can never implement a sealed interface.
    B. A record must explicitly be listed in the permits clause to implement a sealed interface.
    C. A record implements sealed interfaces implicitly without permits.
    D. Sealed interfaces cannot be extended by records.

  • Question 6:

    Which statement about virtual threads (Project Loom, Java 21) is true?

    A. Virtual threads share OS-level stacks.
    B. Virtual threads require explicit pool management.
    C. Virtual threads are created using Thread.startVirtualThread().
    D. Virtual threads block the carrier thread during I/O.

  • Question 7:

    Which of the following text block declarations compiles?

    A. String s = """Hello "Java";""";
    B. String s = """Hello Java""";
    C. String s = """Hello Java";
    D. String s = """"Hello Java"""";

  • Question 8:

    What is the output?

    record R(int x) implements AutoCloseable {

    public void close() { System.out.print("close "); }

    }

    try (R r = new R(1)) {

    System.out.print("run ");

    } finally {

    System.out.print("finally ");

    }

    A. run finally
    B. close run finally
    C. run close finally
    D. run finally close

  • Question 9:

    What is the output?

    record R(int x) implements AutoCloseable {

    public void close() { System.out.print("close "); } } try (R r = new R(1)) {

    System.out.print("run "); } finally { System.out.print("finally "); }

    A. run finally
    B. close run finally
    C. run close finally
    D. run finally close

  • Question 10:

    Given:

    sealed interface Shape permits Circle, Square {} final class Circle implements Shape { double radius; } final class Square implements Shape { double side; }

    static double area(Shape s) {

    return switch (s) {

    case Circle c -> Math.PI * c.radius * c.radius;

    case Square sq -> sq.side * sq.side;

    }; }

    Which statement is true?

    A. The code does not compile because the switch must have a default.
    B. The switch expression exhaustively handles all permitted subtypes.
    C. Pattern variables c and sq must be declared final.
    D. The method area must declare throws Exception.

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-830 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.