Lessons
Java syntax, types, and operators
int, double, boolean, char, String, var (Java 10+), and the primitive vs reference type distinction.
What to look for:
- The 8 primitive types table
- String equals() vs == — critical
- Autoboxing Integer cache boundary (127)
- var — local inference only
Control flow and methods
if/else, switch expressions (Java 14+), for/for-each/while, method parameters and return types.
What to look for:
- Switch expressions with arrow syntax
- for-each vs traditional for loop
- Method overloading — same name, different parameters
- void vs return type
Classes and objects
Define classes, write constructors, use access modifiers, and understand this keyword.
Prerequisite: Lessons 1-2
What to look for:
- The BankAccount example — trace through it
- private fields, public methods — encapsulation
- @Override toString()
- equals/hashCode contract — must override both
Arrays and ArrayList
Fixed-size arrays, ArrayList as a dynamic array, and when to use each.
Prerequisite: Lesson 3
What to look for:
- Array syntax: int[] arr
- ArrayList add/get/remove/size
- When array vs ArrayList
- List.of() — immutable, throws on add
Basic I/O and exceptions
System.out.println, Scanner, try/catch/finally, throwing exceptions, checked vs unchecked.
Prerequisite: Lessons 1-4
What to look for:
- Checked vs unchecked exception distinction
- try-with-resources pattern
- Exception hierarchy
- throws declaration in method signature
How to use this track: Each lesson links to the Codex reference page. Use reading level tabs (Curious / Exploring / Deep Dive). Check "What to look for". Take the quiz when ready.
Track quiz
4 questions on the Foundations track.
What is the correct way to compare two String values in Java?
What is the default value of an int field in a Java class?
What does final mean for a local variable?
Which access modifier makes a field visible only within its own class?