Oracle 1z1-830 Actual Free Exam Questions & Community Discussion

  • Exam Code/Number: 1z1-830
  • Exam Name/Title: Java SE 21 Developer Professional
  • Certification Provider: Oracle
  • Corresponding Certification: Java SE
  • Exam Questions: 85
  • Updated On: Oct 14, 2026
Given:
java
package vehicule.parent;
public class Car {
protected String brand = "Peugeot";
}
and
java
package vehicule.child;
import vehicule.parent.Car;
public class MiniVan extends Car {
public static void main(String[] args) {
Car car = new Car();
car.brand = "Peugeot 807";
System.out.println(car.brand);
}
}
What is printed?
Correct Answer: A Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Which of the following can be the body of a lambda expression?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
Object input = 42;
String result = switch (input) {
case String s -> "It's a string with value: " + s;
case Double d -> "It's a double with value: " + d;
case Integer i -> "It's an integer with value: " + i;
};
System.out.println(result);
What is printed?
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
interface SmartPhone {
boolean ring();
}
class Iphone15 implements SmartPhone {
boolean isRinging;
boolean ring() {
isRinging = !isRinging;
return isRinging;
}
}
Choose the right statement.
Correct Answer: B Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
Period p = Period.between(
LocalDate.of(2023, Month.MAY, 4),
LocalDate.of(2024, Month.MAY, 4));
System.out.println(p);
Duration d = Duration.between(
LocalDate.of(2023, Month.MAY, 4),
LocalDate.of(2024, Month.MAY, 4));
System.out.println(d);
What is the output?
Correct Answer: D Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
Optional o1 = Optional.empty();
Optional o2 = Optional.of(1);
Optional o3 = Stream.of(o1, o2)
.filter(Optional::isPresent)
.findAny()
.flatMap(o -> o);
System.out.println(o3.orElse(2));
What is the given code fragment's output?
Correct Answer: E Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
public class Test {
class A {
}
static class B {
}
public static void main(String[] args) {
// Insert here
}
}
Which three of the following are valid statements when inserted into the given program?
Correct Answer: B,C,F Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
public static void main(String[] args) {
try {
throw new IOException();
} catch (IOException e) {
throw new RuntimeException();
} finally {
throw new ArithmeticException();
}
}
What is the output?
Correct Answer: D Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Given:
java
String textBlock = """
j \
a \t
v \s
a \
""";
System.out.println(textBlock.length());
What is the output?
Correct Answer: D Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
0
0
0
10