Oracle Java SE 21 study guide
Oracle Java SE 21 · Work through your exam, one topic at a time.
The Oracle Java SE 21 Developer credential - exam code 1Z0-830 - is Oracle's professional-level certification for programmers who build applications on the Java Platform, Standard Edition, version 21. It is aimed at working developers rather than beginners: candidates are expected to already write, compile, and debug Java code comfortably, and to understand the library APIs well enough to reason about how a given snippet will behave at runtime. The Oracle Java SE 21 study guide has 10 sections and about 2,968 words.
01Handling Date, Time, Text, Numeric and Boolean Values
String is immutable: every trim , substring , replace or concat returns a new object, so use StringBuilder (not thread-safe) or StringBuffer (synchronized) for concatenation inside loops. == compares references, equals compares content.
293 words, about 1 min02Controlling Program Flow
A switch selector may be int -compatible ( byte , short , char , int and their wrappers), String , or an enum - never long , float , double or boolean . Colon-style statement labels fall through unless you break ; arrow labels never fall through and allow case 1, 2 - .
321 words, about 2 min03Using Object-Oriented Concepts in Java
Know the pillars concretely: encapsulation (private fields plus accessors), inheritance (single class extends , multiple interface implements ), polymorphism (virtual dispatch through the reference type), abstraction ( abstract classes, interfaces). Constructor chaining via this(...) / super(...) must be the first statement; if you omit super() , the compiler inserts a no-arg call, which fails when the parent has no no-arg constructor.
316 words, about 2 min04Exception Handling
Throwable splits into Error (do not catch) and Exception , whose subclass RuntimeException is unchecked. Checked exceptions must be caught or declared; unchecked ones need not be.
303 words, about 2 min05Arrays and Collections
Both int[] a and int a[] declare the same type. new int[3] is zero-filled; length is a field, not a method.
288 words, about 1 min06Streams and Lambda Expressions
A lambda supplies the implementation of a functional interface - exactly one abstract method (default and static methods do not count). The target type comes from context: assignment, argument, or return.
301 words, about 2 min07Packaging and Deploying Java Code
A package statement must be the first non-comment line; imports are not transitive; a public class must live in a file with the same name. javac -d out src/ / .java writes class files into a directory tree mirroring the package, and java -cp out com.example.Main runs them.
307 words, about 2 min08Managing Concurrent Code Execution
Define work with Runnable or Callable . A thread reaches TERMINATED once and never restarts; start() - not run() - begins a new thread of execution.
309 words, about 2 min09Using Java I/O API
java.nio.file is the modern API: Path.of("dir", "a.txt") (or Paths.get ), with resolve (join), relativize , normalize , toAbsolutePath , getFileName , getParent . Files provides convenience methods: readString , readAllLines , writeString , exists , isDirectory , createDirectories , copy , move , delete , deleteIfExists , list , walk , lines .
243 words, about 1 min10Accessing Databases Using JDBC
DriverManager.getConnection(url, user, password) returns a Connection . JDBC 4+ auto-loads drivers from the classpath, so Class.forName is legacy.
287 words, about 1 min