Skip to content

Java Programming Textbook

A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 170 companion flashcards using spaced repetition.

8 chapters · 170 cards · Updated

Chapters

  1. 1Java Platform and Memory Model

    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...

  2. 2Core Language Features

    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...

  3. 3Object-Oriented Programming

    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...

  4. 4Generics and the Collections Framework

    Generics let classes, interfaces, and methods operate on parameterized types, providing compile-time type safety and eliminating most casts. List<String> names = new ArrayLis...

  5. 5Functional Programming and the Streams API

    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...

  6. 6Concurrency and the Java Memory Model

    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...

  7. 7Exception Handling, I/O, and Serialization

    Java's exception model centers on the Throwable hierarchy. Throwables split into Error (serious, unrecoverable conditions such as OutOfMemoryError and StackOverflowError, which app...

  8. 8Modern Java, Design Patterns, and Best Practices

    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...

← Back to the Java Programming deck