Java Masterclass — 109 lessons
Java from zero to fluent
Learn Java by writing real Java in a full Monaco editor. From how the JVM runs your code to the type system, operators, control flow, loops, and the object model. Every practice is graded instantly in the browser by pattern-matching — authentic Java, no server, zero cost.
Course progress0/109 · 0%
Chapter 1 · Meet Java & the JVM
0/6Chapter 2 · Variables, types & conversions
0/6Chapter 3 · Operators
0/6Step 21Arithmetic: + - * / % and the integer-division trapStep 22Assignment, compound operators & ++ / --Step 23Relational operators & the == vs .equals trapStep 24Logical operators && || ! and short-circuitingStep 25Precedence & associativity: why 2 + 3 * 4 is 14Step 26The ternary operator: cond ? a : b
Chapter 4 · Control flow — if, switch & ternary
0/6Chapter 5 · Loops
0/6Chapter 6 · Classes, objects & methods
0/7Step 51Classes & objects: blueprint vs instanceStep 52Fields & methods: state and behaviorStep 53Method overloading: same name, different signaturesStep 54Constructors: initializing a new objectStep 55The `this` keyword: the current objectStep 56Stack, heap & references: where objects liveStep 57Static members: shared across all instances
Chapter 7 · Arrays
0/7Step 61Arrays: a fixed block of same-typed slotsStep 62Array literals & the indexed for loopStep 63The for-each loop: read every element, no indexStep 642-D arrays: grids, rows, columns & nested loopsStep 65Jagged arrays: rows of different lengthsStep 66Arrays of objects: references default to nullStep 67java.util.Arrays: sort, toString, fill, copyOf, binarySearch
Chapter 8 · Strings in depth
0/7Step 71String basics: an object, the pool & ==Step 72Immutability: Strings never changeStep 73Core methods: length, charAt, indexOf, substringStep 74Split & join: from one String to many and backStep 75StringBuilder: a mutable String for loopsStep 76Formatting: String.format, printf & text blocksStep 77Equality: ==, equals, equalsIgnoreCase & compareTo
Chapter 9 · Encapsulation & packages
0/7Step 81Encapsulation: hide data, expose behaviorStep 82Getters & setters: controlled, validated accessStep 83Access modifiers: public, protected, default & privateStep 84Packages & imports: organizing the namespaceStep 85Constructor chaining: this(...) & overloadingStep 86Static members in depth: shared state & factoriesStep 87Immutable classes: state that never changes
Chapter 10 · Inheritance & polymorphism
0/8Step 91Inheritance: extends & the "is-a" relationshipStep 92super: calling the parent constructor & methodsStep 93Overriding methods & @OverrideStep 94Polymorphism: one reference, many formsStep 95Dynamic method dispatch: the JVM picks the overrideStep 96final: locking variables, methods & classesStep 97The Object class: toString, equals & hashCodeStep 98Casting & instanceof: up, down & pattern matching
Chapter 11 · Abstraction — interfaces & enums
0/8Step 101Abstract classes: a blueprint you can't buildStep 102Interfaces: a pure contractStep 103Default & static methods in interfacesStep 104Interface vs abstract class: which & whenStep 105Functional interfaces & a lambda previewStep 106Enums: a fixed set of named constantsStep 107Rich enums: fields, constructors & methodsStep 108Annotations: metadata on your code
Chapter 12 · Exceptions & error handling
0/7Step 111What is an exception? try, catch & the stack unwindStep 112Multiple catch blocks & multi-catchStep 113The hierarchy: checked vs uncheckedStep 114throw vs throws: raising and declaringStep 115Custom exception classesStep 116finally: cleanup that always runsStep 117try-with-resources: automatic cleanup
Chapter 13 · Collections & generics
0/7Step 121Generics: type parameters and compile-time safetyStep 122The Collections Framework: a map of the interfacesStep 123List & ArrayList: a resizable, indexed sequenceStep 124Set: uniqueness, and the equals/hashCode contractStep 125Map & HashMap: key → value lookupsStep 126Iterating: for-each, Iterator & safe removalStep 127Ordering: Comparable vs Comparator
Chapter 14 · Lambdas & the Stream API
0/8Step 131Lambda expressions: behaviour as a valueStep 132Method references: the lambda's shorthandStep 133Streams: a pipeline, not a collectionStep 134map & filter: transform and keepStep 135Terminal ops: reduce & collectStep 136sorted, distinct, limit, skip & peekStep 137Optional: a box that may be emptyStep 138Putting it together: full pipelines & when not to stream