Free 1z0-830: Java SE 21 Developer Professional Exam Questions and Answers
81 verified practice questions for 1z0-830.
The first 10 questions on this page are free to read, answers included — no account and no card. A plan opens the rest of the bank, the full timed practice test and your weak-topic reporting.
Last updated: September 19, 2026
- Provider
- Oracle
- Questions in our bank
- 1000+
- Free to read
- First 10, with answers
- Our test mode duration & pass mark
- 130 mins · 70%
- Verified answers
- Reviewed weekly
- Practice format
- Multiple choice
Recommended: Switch to Test Mode to start a practice test that simulates the real exam experience.
Question #1
Given a properties file on the classpath named Person.properties with the content: ini name=James And: java public class Person extends ListResourceBundle { protected Object[][] getContents() { return new Object[][]{ {"name", "Jeanne"} }; } } And: java public class Test { public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("Person"); String name = bundle.getString("name"); System.out.println(name); } } What is the given program's output?
Please select an optionIncorrectCorrect answer: F
ResourceBundle.getBundle looks for a class named Person before a Person.properties file, so the ListResourceBundle subclass wins and its mapping for name, Jeanne, is printed.
Was this answer correct?Question #2
Given: java public class Versailles { int mirrorsCount; int gardensHectares; void Versailles() { // n1 this.mirrorsCount = 17; this.gardensHectares = 800; System.out.println("Hall of Mirrors has " + mirrorsCount + " mirrors."); System.out.println("The gardens cover " + gardensHectares + " hectares."); } public static void main(String[] args) { var castle = new Versailles(); // n2 } } What is printed?
Please select an optionIncorrectCorrect answer: C
Because it declares a return type, void Versailles() is a method rather than a constructor, so the implicit default constructor runs and no print statement executes. The program compiles and exits without output.
Was this answer correct?Question #3
Given: java String s = " "; System.out.print("[" + s.strip()); s = " hello "; System.out.print("," + s.strip()); s = "h i "; System.out.print("," + s.strip() + "]"); What is printed?
Please select an optionIncorrectCorrect answer: B
strip() removes leading and trailing whitespace only: the blank string becomes empty, " hello " becomes hello, and "h i " becomes "h i" with the inner space kept, giving [,hello,h i].
Was this answer correct?Question #4
Given: java StringBuffer us = new StringBuffer("US"); StringBuffer uk = new StringBuffer("UK"); Stream<StringBuffer> stream = Stream.of(us, uk); String output = stream.collect(Collectors.joining("-", "=", "")); System.out.println(output); What is the given code fragment's output?
Please select an optionIncorrectCorrect answer: D
StringBuffer is a CharSequence, so joining applies: prefix "=", elements separated by "-", empty suffix, producing =US-UK.
Was this answer correct?Question #5
Given: java Runnable task1 = () -> System.out.println("Executing Task-1"); Callable<String> task2 = () -> { System.out.println("Executing Task-2"); return "Task-2 Finish."; }; ExecutorService execService = Executors.newCachedThreadPool(); // INSERT CODE HERE execService.awaitTermination(3, TimeUnit.SECONDS); execService.shutdownNow(); Which of the following statements, inserted in the code above, printsboth: "Executing Task-2" and "Executing Task-1"?
Select 2 answers.
Please select an optionIncorrectCorrect answer: G, H
submit is overloaded for both Runnable and Callable, so submit(task1) and submit(task2) both schedule their task and print its message. execute accepts only Runnable, and call/run are not ExecutorService methods.
Was this answer correct?Question #6
Given: java sealed class Vehicle permits Car, Bike { } non-sealed class Car extends Vehicle { } final class Bike extends Vehicle { } public class SealedClassTest { public static void main(String[] args) { Class<?> vehicleClass = Vehicle.class; Class<?> carClass = Car.class; Class<?> bikeClass = Bike.class; System.out.print("Is Vehicle sealed? " + vehicleClass.isSealed() + "; Is Car sealed? " + carClass.isSealed() + "; Is Bike sealed? " + bikeClass.isSealed()); } } What is printed?
Please select an optionIncorrectCorrect answer: C
Only Vehicle carries the sealed modifier, so isSealed returns true for it. Car is declared non-sealed and Bike final, so neither is sealed.
Was this answer correct?Question #7
Which of the following statements are correct?
Please select an optionIncorrectCorrect answer: E
None holds universally: top-level classes cannot be private or protected, local and anonymous classes cannot be public, and final cannot be applied to abstract, sealed or non-sealed classes.
Was this answer correct?Question #8
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?
Please select an optionIncorrectCorrect answer: D
Period.between accepts LocalDate and prints P1Y, but Duration.between needs a time component, so calling it on two LocalDate values throws UnsupportedTemporalTypeException after the first line has printed.
Was this answer correct?Question #9
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?
Please select an optionIncorrectCorrect answer: B
--module-source-path points at the module sources, -p supplies the module path for the required JAR, -d names the output directory, and -m selects the module to compile.
Was this answer correct?Question #10
Given: java var hauteCouture = new String[]{ "Chanel", "Dior", "Louis Vuitton" }; var i = 0; do { System.out.print(hauteCouture[i] + " "); } while (i++ > 0); What is printed?
Please select an optionIncorrectCorrect answer: A
A do-while runs the body once, printing Chanel, then evaluates i++ > 0 with i still 0, which is false, so the loop ends after one iteration.
Was this answer correct?
Continue with 1z0-830: Java SE 21 Developer Professional
Unlock the full question bank
You have read the first 10 questions. A subscription opens every question in 1z0-830: Java SE 21 Developer Professional, the full timed practice test, and your progress and weak-topic reporting.
Single exam
$19.99for 30 days
Full question bank and practice test for one exam, for 30 days.
Single exam
$49.99for 1 year
One exam for a full year. Nothing renews and nothing to cancel.
Full access
$39.99/mo
Every exam in the catalogue, month to month.
Full access
$199.99/yr
Every exam in the catalogue for a year.
Already subscribed? Sign in to pick up where you left off.
Other Oracle certifications
- 1z0-062: Oracle Database 12c Installation and Administration (opens in a new tab)
- 1z0-067: Upgrade Oracle9i10g11g OCA OR OCP to Oracle Database 12c OCP (opens in a new tab)
- 1z0-071: Oracle Datbase 12c SQL (opens in a new tab)
- 1z0-063: Oracle Database 12c Advanced Administration (opens in a new tab)
- 1z0-1105-22: Oracle Cloud Data Management 2022 Foundations Associate (opens in a new tab)
- 1z0-821: Oracle Solaris 11 System Administration (opens in a new tab)
Reviews
★★★★★
This platform is a lifesaver. The practice questions and explanations are so detailed. It’s the best study tool I’ve ever used.
Hannah Smith
USA
★★★★★
I highly recommend Exam Practice. The feedback after each test helped me improve significantly, and I passed my exams easily.
Oscar Nyström
Sweden
★★★★★
Exam Practice is worth every penny. The mock exams are realistic, and the feedback helped me focus on key areas.
Amit Sharma
India
FAQ
Learn More: https://academy.oracle.com/en/resources-oracle-certifications.html
- Q1: What are Oracle Certification Exams?
- A: Oracle Certification Exams validate your expertise in using and managing Oracle’s vast array of software and hardware solutions, including databases, cloud infrastructure, enterprise applications, and more. These certifications demonstrate your proficiency in deploying, configuring, and optimizing Oracle technologies to meet business needs.
- Q2: Why should I pursue Oracle Certification?
- A: Oracle Certification enhances your professional credibility, showcasing your skills and knowledge in Oracle technologies. This can lead to better job opportunities, higher salaries, and career advancement in IT, database management, cloud computing, and enterprise application roles.
- Q3: What are the benefits of Oracle Certification?
- A: Benefits include recognition as a certified Oracle professional, improved job performance, access to exclusive resources, continuing education opportunities, and staying current with the latest Oracle technologies and best practices.
- Q4: Who should take Oracle Certification Exams?
- A: IT professionals, database administrators, developers, system administrators, and anyone involved in managing and implementing Oracle solutions should consider these certifications to validate their expertise and advance their careers.
- Q5: What types of Oracle Certification Exams are available?
- A: Oracle offers various certification paths, including:
- Q6: How do I prepare for Oracle Certification Exams?
- A: Preparation can include official Oracle University training courses, study guides, practice exams, online tutorials, and hands-on experience with Oracle products and solutions.
- Q7: Where can I take Oracle Certification Exams?
- A: Oracle Certification Exams can be taken online with remote proctoring or at authorized Pearson VUE testing centers worldwide, providing flexibility to fit your schedule and location.
- Q8: How do Oracle Certifications impact my career?
- A: Oracle Certifications significantly boost your career by demonstrating your expertise to employers, making you a more competitive candidate for advanced roles and promotions in IT, database management, cloud computing, and enterprise applications.
- Q9: Are there any prerequisites for Oracle Certification Exams?
- A: Some exams may have prerequisites, such as foundational knowledge or prior experience with Oracle products. Check the specific requirements for each certification path on the Oracle certification website.
- Q10: How often do I need to recertify for Oracle Certifications?
- A: Recertification requirements vary by certification. Some Oracle certifications do not require recertification, while others, especially those related to cloud technologies, may require periodic updates to ensure professionals stay current with the latest advancements.



