warming up your workspace

Java

Learn Java through the design of small, understandable systems. Explore objects, collections, contracts, and design patterns before building an order-processing engine.

What helps

The Foundations section introduces the language. The main projects build on basic values, decisions, loops, and methods as you work towards larger programs.

Java pathway

Programming Foundations / Practice rooms / Track curriculum and enrollment

  1. Java Foundations

    Practice primitive arithmetic, text, arrays and control flow. Organize calculations into static methods, and learn where integer division, reference sharing and overflow affect results.

    • Types & Arithmetic: 5 lessons
    • Strings: 5 lessons
    • Arrays: 5 lessons
    • Control Flow: 5 lessons
    • Methods: 5 lessons
  2. Classes & Objects

    Build classes with constructors, instance state and methods. Protect invariants, copy mutable data where ownership requires it, implement equality and hashing together, and combine objects through composition.

    • Class Anatomy: 5 lessons
    • Encapsulation: 5 lessons
    • The equals Contract: 5 lessons
    • Composition: 5 lessons
    • Static vs Instance: 5 lessons
  3. Inheritance & Polymorphism

    Use extends, super, abstract classes and interfaces to share behavior and express capabilities. Trace dynamic method dispatch separately from field access and static calls, and check runtime types before uncertain casts.

    • Extends & Super: 5 lessons
    • Dynamic Dispatch: 5 lessons
    • Abstract Classes: 5 lessons
    • Interfaces: 5 lessons
    • Casting & instanceof: 5 lessons
  4. Collections from Scratch

    Build small growable arrays, linked lists, chained hash maps and unbalanced search trees. Relate each operation to its storage and cost, then use java.util collections and comparators for practical tasks.

    • A Growable Array: 5 lessons
    • A Linked Chain: 5 lessons
    • A Hash Map: 5 lessons
    • A Search Tree: 5 lessons
    • The Real java.util: 5 lessons
  5. Generics

    Use type parameters to express reusable containers and methods. Add bounds for required capabilities, apply extends and super wildcards, and examine boxing, erasure and runtime type checks.

    • Type Parameters: 5 lessons
    • Bounded Types: 5 lessons
    • Wildcards & PECS: 5 lessons
    • Generic Containers: 5 lessons
    • Erasure & Limits: 5 lessons
  6. Exceptions & Contracts

    Specify failure behavior alongside successful results. Throw and catch appropriate types, preserve useful causes, manage resource cleanup, and compare exceptions with result objects and collected validation errors.

    • Throwing: 5 lessons
    • Catching: 5 lessons
    • finally & Resources: 5 lessons
    • Custom Exceptions: 5 lessons
    • Validation Patterns: 5 lessons
  7. Design Patterns I: Creational & Structural

    Practice builders, factories, decorators, adapters and composites through concrete object contracts. Each pattern addresses a different problem in creation, optional behavior or collaboration between interfaces.

    • Builder: 5 lessons
    • Factory Method: 5 lessons
    • Decorator: 5 lessons
    • Adapter: 5 lessons
    • Choosing Structures: 5 lessons
  8. Design Patterns II: Behavioral

    Make behavior configurable with strategies, notify listeners with observers, and represent reversible work as commands. Model state transitions, customize template methods and implement iterators with explicit exhaustion rules.

    • Strategy: 5 lessons
    • Observer: 5 lessons
    • Command: 5 lessons
    • State & Template Method: 5 lessons
    • Iterator & Iterable: 5 lessons
  9. Functional Java

    Pass behavior through functional interfaces and compose functions. Build an eager list-backed Pipe with mapping, filtering and reduction, then compare it with lazy Java Streams and use callbacks for caching, retry and configurable processing.

    • Lambdas: 5 lessons
    • Build a Pipe: 5 lessons
    • More Pipeline Ops: 5 lessons
    • The Real Streams: 5 lessons
    • Functional Design: 5 lessons
  10. Capstone: An Order-Processing Engine

    Build an in-memory order model, pricing policies, event listeners and reversible operations. Assemble them in Engine3: register products, retain order lines, swap pricing, emit add/undo/checkout events and keep an audit. Finish with a driver that uses supplied products and requests to check out an order.

    • The Domain: 5 lessons
    • The Pricing Engine: 5 lessons
    • Order Events: 5 lessons
    • The Workflow: 5 lessons
    • The Engine: 5 lessons