A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 170 companion flashcards using spaced repetition.
Java's reputation rests on the famous "Write Once, Run Anywhere" principle, and that promise is delivered by a layered software stack. The Java Virtual Machine (JVM) is an abstract...
Java's type system rests on eight primitive data types that map directly to hardware: byte (8-bit), short (16-bit), int (32-bit), long (64-bit), float (32-bit IEEE 754), double (64...
Object-oriented design in Java rests on four pillars. Encapsulation bundles an object's data and methods together, restricting direct access by marking fields private and exposing...
Generics let classes, interfaces, and methods operate on parameterized types, providing compile-time type safety and eliminating most casts. List<String> names = new ArrayLis...
The arrival of lambdas in Java 8 transformed the language from verbose anonymous classes into concise functional expressions. A lambda implements a functional interface—an interfac...
Java supports concurrent execution of multiple threads within a single program. Threads can be created by extending Thread and overriding run(), by implementing the Runnable interf...
Java's exception model centers on the Throwable hierarchy. Throwables split into Error (serious, unrecoverable conditions such as OutOfMemoryError and StackOverflowError, which app...
Java 9 introduced the Java Platform Module System (JPMS, Project Jigsaw), which groups packages into modules declared in a module-info.java file. The key clauses are requires (depe...