Topic-wise curriculum · Java 21

Core Java

Sixteen chapters that follow the language the way you actually meet it: run a program first, learn types next, then objects, contracts, failure handling, the library, and finally the modern features that make Java code short.

Foundations

The JVM, types, control flow, methods, arrays, and strings.

Object design

Classes, interfaces, inheritance, and annotations.

Failure and library

Exceptions, collections, generics, Optional, testing, and modern Java.

Runtime and I/O

Concurrency first, then optional file I/O and serialization.

  1. 01The JVM and Your First Program 20 minCompile Java to bytecode, run it on the JVM, and write a minimal Hello World with a correct main method.
  2. 02Types, Nullability, Money, and Time 25 minUse primitives, references, null, BigDecimal, java.time, operators, and casting correctly; treat Scanner as a small console example.
  3. 03Control Flow 25 minBranch with if and switch expressions, and repeat work with for, while, and do-while loops.
  4. 04Methods and Parameter Passing 25 minDeclare methods with parameters and return values, understand pass-by-value, and use recursion only when it clarifies the problem.
  5. 05Arrays and Strings 25 minUse fixed-length arrays and the immutable String type, and accumulate text with StringBuilder.
  6. 06Classes and Objects 30 minModel state with fields and constructors, use this and static correctly, and protect invariants by encapsulation.
  7. 07Interfaces and Abstraction 30 minDefine contracts with interfaces, prefer composition over inheritance, and hide detail with access modifiers.
  8. 08Inheritance and Polymorphism 30 minExtend classes, override methods, and call the right behavior through a supertype reference when inheritance is appropriate.
  9. 09Annotations and Metadata 25 minRead common annotations, declare a small custom annotation, and understand how metadata becomes available at runtime.
  10. 10Exceptions and Resource Management 25 minSeparate happy-path code from failure handling, preserve causes, and close resources safely with try-with-resources.
  11. 11The Collections Framework 35 minChoose List, Set, or Map by contract, keep equals and hashCode consistent, and return safe collection views.
  12. 12Generics and Optional 35 minParameterize APIs for type safety, use bounds and wildcards correctly, and represent an absent return value explicitly.
  13. 13Testing Basics with JUnit 25 minWrite framework-free unit tests with arrange-act-assert, meaningful assertions, and failure-path coverage.
  14. 14Modern Java 30 minWrite concise code with lambdas and streams, then apply records, sealed types, and pattern switches deliberately.
  15. 15Concurrency and Thread Safety 30 minUnderstand visibility, atomicity, thread confinement, and executors before sharing work between threads.
  16. 16Optional: File I/O and Serialization 25 minRead and write files with the Files API, and understand why native Java serialization is legacy material.