Free practice questions
Java SE 21 Developer Professional (1Z0-830) practice questions
10 free sample questions with explanations — no account needed. When you're ready, take the full-length timed exam.
50
questions on the full exam
120 min
time limit
68%
to pass (68%)
Exam domains covered
- Values, Text, Dates and Program Flow16%
- Object-Oriented Concepts22%
- Exceptions, Arrays and Collections18%
- Streams and Lambda Expressions14%
- Modules, Concurrency, I/O and Localization30%
What is the output of this program?
public class Main {
public static void main(String[] args) {
int x = 7 / 2;
double y = 7 / 2;
double z = 7 / 2.0;
System.out.println(x + ":" + y + ":" + z);
}
}
Which two statements are true about this code fragment?
public class Demo {
public static void main(String[] args) {
int base = 10;
java.util.function.IntSupplier s = () -> base + 1;
// line 1
System.out.println(s.getAsInt());
}
}
Consider line 1 independently.
Select all that apply.
A developer writes this class and then calls Collections.sort(listOfScores):
class Score implements Comparable<Score> {
int value;
Score(int value) { this.value = value; }
public int compareTo(Score other) {
return value - other.value;
}
}
Which statement is the best assessment?
Which statements about grouping and partitioning are true?
var words = java.util.List.of("a", "to", "tea", "ten");
Select all that apply.
Select all that apply.
Review this descriptor pair:
// module data
module data {
opens data.model;
}
// module report
module report {
requires data;
}
A class in report tries to import data.model.Record and create new Record(). Record is public. What is the result?
Which statements about java.time are true? Select all that apply.
Select all that apply.
What is the output of this program?
class A {
static { System.out.print("AS "); }
{ System.out.print("AI "); }
A() { System.out.print("AC "); }
}
class B extends A {
static { System.out.print("BS "); }
{ System.out.print("BI "); }
B() { System.out.print("BC "); }
}
public class Test {
public static void main(String[] args) {
new B();
new B();
}
}
Consider this code:
import java.util.*;
public class Test {
public static void main(String[] args) {
List<? extends Number> a = new ArrayList<Integer>();
List<? super Integer> b = new ArrayList<Number>();
List<?> c = new ArrayList<String>();
}
}
Which statements are true?
Select all that apply.
What happens when this code runs?
var map = java.util.stream.Stream.of("ant", "ape", "bat")
.collect(java.util.stream.Collectors.toMap(
s -> s.charAt(0),
s -> s.length()));
System.out.println(map);
Which module-info.java for module consumer correctly states that it depends on module api and consumes service type api.spi.Parser?
What is the correct descriptor?
Ready for the real thing?
Take a full-length, timed 50-question 1Z0-830 practice exam weighted like the official blueprint, with fresh questions each time, results by domain and a full answer review.
Inkwell practice questions are original and independent. Not affiliated with or endorsed by the certification vendor.
