Free 1z1-830 Questions for Oracle Java SE 21 Developer Professional 1z1-830 Exam as PDF & Practice Test Engine

  • 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: Nov 20, 2026
A module com.eiffeltower.shop with the related sources in the src directory.
That module requires com.eiffeltower.membership, available in a JAR located in the lib directory.
What is the command to compile the module com.eiffeltower.shop?
Correct Answer: A Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given:
java
package com.vv;
import java.time.LocalDate;
public class FetchService {
public static void main(String[] args) throws Exception {
FetchService service = new FetchService();
String ack = service.fetch();
LocalDate date = service.fetch();
System.out.println(ack + " the " + date.toString());
}
public String fetch() {
return "ok";
}
public LocalDate fetch() {
return LocalDate.now();
}
}
What will be the output?
Correct Answer: D Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
What does the following code print?
java
import java.util.stream.Stream;
public class StreamReduce {
public static void main(String[] args) {
Stream<String> stream = Stream.of("J", "a", "v", "a");
System.out.print(stream.reduce(String::concat));
}
}
Correct Answer: B Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given:
java
record WithInstanceField(String foo, int bar) {
double fuz;
}
record WithStaticField(String foo, int bar) {
static double wiz;
}
record ExtendingClass(String foo) extends Exception {}
record ImplementingInterface(String foo) implements Cloneable {}
Which records compile? (Select 2)
Correct Answer: B,C Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given:
java
Object myVar = 0;
String print = switch (myVar) {
case int i -> "integer";
case long l -> "long";
case String s -> "string";
default -> "";
};
System.out.println(print);
What is printed?
Correct Answer: E Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Which of the following doesnotexist?
Correct Answer: D Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given:
java
Stream<String> strings = Stream.of("United", "States");
BinaryOperator<String> operator = (s1, s2) -> s1.concat(s2.toUpperCase()); String result = strings.reduce("-", operator); System.out.println(result); What is the output of this code fragment?
Correct Answer: D Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given:
java
List<String> frenchAuthors = new ArrayList<>();
frenchAuthors.add("Victor Hugo");
frenchAuthors.add("Gustave Flaubert");
Which compiles?
Correct Answer: B,C,D Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
Given:
java
var frenchCities = new TreeSet<String>();
frenchCities.add("Paris");
frenchCities.add("Marseille");
frenchCities.add("Lyon");
frenchCities.add("Lille");
frenchCities.add("Toulouse");
System.out.println(frenchCities.headSet("Marseille"));
What will be printed?
Correct Answer: B Vote an answer
Explanation: Only visible for ExamDiscuss members. You can sign-up / login (it's free).
0
0
0
10