Series
Complete Modern Java
29 episodes, in order. The code builds on itself, so following from the start leaves you with a complete system rather than a pile of samples.
-
Your First Java Program, Explained: From Code to Result →
The first episode of Complete Modern Java, for complete beginners. One small grocery receipt program, typed line by line and run in Java and in TypeScript: what source code is, what a compiler and a runtime do, the terminal and the IDE. Then one tiny change: Java refuses to compile, and TypeScript reports the same mistake but still produces a program that prints "Items: 2one" and "Total: $NaN".
-
Install Java 25 and IntelliJ IDEA on a Mac (Complete Beginner) →
Episode 2 of Complete Modern Java. A fresh IntelliJ IDEA, Java 25 downloaded from inside it, the grocery receipt program typed and run, and then the part most setups get wrong: the terminal still finds an old Java. Why that happens, how to fix it for one window, and how to run the program without an IDE.
-
Install Node.js and TypeScript on a Mac (Complete Beginner) →
Episode 3 of Complete Modern Java. Node, npm and TypeScript installed with no admin password, the .zshrc a new Mac does not have, TypeScript installed in the project, the grocery receipt rebuilt in TypeScript, and a TypeScript program that is wrong and runs anyway.
-
Read Your First Errors in Java and TypeScript (Complete Beginner) →
Episode 4 of Complete Modern Java. The four kinds of error, broken on purpose in Java and TypeScript: syntax, compile, runtime and logic. What each message says, where to look, how to read a stack trace, and one habit for every error.
-
Use the Debugger in Java and TypeScript (Complete Beginner) →
Episode 5 of Complete Modern Java. A receipt that prints $4.99 with no error, found with a breakpoint: Run versus Debug, pausing before a line runs, Step Over, Evaluate, Resume, and the free TypeScript route with node --inspect-brk and Chrome DevTools.
-
Values and Types in Java and TypeScript (Complete Beginner) →
Episode 6 of Complete Modern Java. Why Java printed Items: 21 for three items: value, variable, type, literal and assignment; int, double, boolean, String and char; the compiler refusing int price = 1.5; and TypeScript number, boolean, string and inference.
-
Java Operators and Integer Division (Complete Beginner) →
Episode 7 of Complete Modern Java. Why Java says a $10 bill split four ways is 2 each: expressions, the five arithmetic operators, integer division and the remainder, one double for decimals, operator order and the left to right trap, and TypeScript's one number type.
-
Java double vs BigDecimal: Why 0.1 + 0.2 Isn't 0.3 →
Episode 8 of Complete Modern Java. Why 1.10 + 2.20 prints 3.3000000000000003: doubles store binary, where one tenth never ends. The proof with BigDecimal, then two ways to keep money exact, whole cents and BigDecimal from text, in Java and TypeScript.
-
Java Integer Overflow and Divide by Zero (Complete Beginner) →
Episode 9 of Complete Modern Java. Why two billion cents plus two billion cents prints a negative number: int overflow drawn as an odometer, long, Math.addExact, dividing by zero in Java, and the safe integer limit in TypeScript.
-
Java if and else: Make Your Program Decide (Complete Beginner) →
Episode 10 of Complete Modern Java. Free delivery from $50: a comparison gives a boolean, if and else choose exactly one branch, the six comparison operators, > against >= at the boundary, the = versus == trap, and === in TypeScript.
-
Java and, or, not and else if (Complete Beginner) →
Episode 11 of Complete Modern Java. A shop with three rules: && and || and ! with truth tables, else if where the first true condition decides, why branch order matters, how && skips a division by zero, and the same rules in TypeScript.
-
Java Loops: while and for (Complete Beginner) →
Episode 12 of Complete Modern Java. Stop copying lines: the while loop and its three parts, the loop that never ends and Ctrl+C, the for loop and i++, why 0 to < 3 prints 0 1 2, a running total with +=, and the same loops in TypeScript.
-
Java Methods: void, Parameters and return (Complete Beginner) →
Episode 13 of Complete Modern Java. Name a set of instructions once and use it again: a void method, what happens when it is called, parameters and arguments, return and a result, and the same three as TypeScript functions.
-
Java Arrays: Indexes and Out of Bounds (Complete Beginner) →
Episode 14 of Complete Modern Java. Keep many values under one name: a first array, indexes that start at 0, changing one value, the out of bounds exception, printing with Arrays.toString, and the same array in TypeScript.
-
Loop Over a Java Array: The One Character That Crashes It →
Episode 15 of Complete Modern Java. Add up every value in an array with one loop: the index loop, why it stops before the length, the one character that crashes it, the for-each loop, an empty array, and the same loops in TypeScript, where the mistake gives NaN.
-
Java Classes and Objects: One Class, Many Objects (Beginner) →
Episode 16 of Complete Modern Java. Make your own type: a class with fields, objects made with new, the default values Java fills in, a constructor with this, a method on the object, an array of objects, and the same class in TypeScript.
-
Java Encapsulation: Private Fields, Getters and Setters (Beginner) →
Episode 17 of Complete Modern Java. Make an object refuse bad data: give the class its own file, make its fields private, read them with getters, change the price with a setter that checks, and see how TypeScript private differs.
-
Java Exceptions: Try, Catch and Keep Going (Beginner) →
Episode 18 of Complete Modern Java. One bad value stopped the whole program: read the stack trace, catch the exception with try and catch, see both paths, catch a NumberFormatException, and handle errors in TypeScript.
-
Java ArrayList: A List That Can Grow (Beginner) →
Episode 19 of Complete Modern Java. An array keeps its length; an ArrayList grows and shrinks. Add, get, size, remove and contains, why a list of int does not compile, an index out of bounds, and the same list in TypeScript.
-
Java List of Objects: A Shopping Cart That Adds Itself Up (Beginner) →
Episode 20 of Complete Modern Java. A list of Product objects, then a ShoppingCart class that owns the list and works out its own total: the import a class file needs, add, count and totalCents, refusing null, and the same cart in TypeScript.
-
Java Same Values, Two Objects: Removing From the Cart (Beginner) →
Episode 21 of Complete Modern Java. Java said Milk was not in the cart: two objects with the same values, == and equals on objects, removing the same object, a removeByName rule of our own, and the same idea in TypeScript.
-
Java HashMap: Find a Product by Name (Beginner) →
Episode 22 of Complete Modern Java. A HashMap links each key to a value: put and get, one value per key, remove, what a missing key gives back and how to check first, and the same idea with a TypeScript Map.
-
Loop Through a Java HashMap: Keys and Values (Beginner) →
Episode 23 of Complete Modern Java. Three ways through a map, keySet, values and entrySet, why a HashMap prints in its own order, and the same loop over a TypeScript Map, which keeps insertion order.
-
Java static and Constants: Values That Belong to the Class (Beginner) →
Episode 24 of Complete Modern Java. A static counter shared by every product, a static final constant, a static method, the two compiler errors static invites, and static readonly in TypeScript.
-
Java Interfaces: A Promise a Class Makes (Beginner) →
Episode 25 of Complete Modern Java. An interface, two classes that implement it, why public is needed, one variable with three objects, a method that never changes, and TypeScript interfaces that disappear at run time.
-
Java Inheritance Explained: extends and super (Beginner) →
Episode 26 of Complete Modern Java. The is-a test, a FreshProduct that extends Product, super in the constructor, inherited methods, @Override with super.describe(), one shelf where each object uses its own version, and the same in TypeScript.
-
Composition or Inheritance: When Not to Use extends in Java (Beginner) →
Episode 27 of Complete Modern Java. Code that compiles but models the wrong thing, is-a against has-a, why extending ArrayList breaks a cart's rules, how composition lets the cart choose its operations, and the catch in TypeScript private.
-
Java Abstract Classes: Share Code, Require Methods (Beginner) →
Episode 28 of Complete Modern Java. An abstract PaymentMethod whose finished totalCents calls an unfinished feeCents, card and cash filling in the fee, why you cannot create the parent, interface or abstract class, and what TypeScript abstract does at run time.
-
Java Polymorphism: One Method Call, Different Behaviour (Beginner) →
Episode 29 of Complete Modern Java. A checkout that asks what kind of payment it has, the same job done by letting each payment object answer, adding a voucher without changing the checkout, one variable with two objects, and the same in TypeScript.