Mastery

Concept map

How these ideas connect

Curated relationships between topics — solid lines connect ideas within a language that build on each other, dashed teal lines cross to the genuinely equivalent concept in the other language. Hover a dot for its title, click to open the topic.

PythonJavaA. Object model, identity & memoryB. Iteration & generatorsC. Functions & closuresD. Classes & OOP internalsE. Typing & modern syntaxF. Concurrency & parallelismA. Object model, identity & memoryB. GenericsC. Collections frameworkD. Streams & functional interfacesE. ConcurrencyF. ExceptionsG. Modern language features (8 → 21)I. Modules & misc stdlib`is` vs `==`, the small-int cache, and string interning`is` vs `==`, the s…The mutable default argument trapThe mutable default…Shallow vs deep copyShallow vs deep copydict/set size cannot change during iterationdict/set size canno…The iterator protocol: why `for` calls `iter()` exactly onceThe iterator protoc…Generators: lazy, one-shot, and why they save memoryGenerators: lazy, o…Late-binding closures: the classic loop-variable-capture bugLate-binding closur…Positional-only (`/`) and keyword-only (`*`) parametersPositional-only (`/…`*args`/`**kwargs`: collection vs unpacking, and ordering rules`*args`/`**kwargs`:…Decorators silently destroy metadata unless you use `functools.wraps`Decorators silently…`@property`, `@staticmethod`, `@classmethod` -- and the descriptor protocol underneath`@property`, `@stat…The `__eq__`/`__hash__` contractThe `__eq__`/`__has…`__repr__` vs `__str__`, and why every class should define `__repr__``__repr__` vs `__st…Context managers: `__enter__`/`__exit__`, `contextlib.contextmanager`, `ExitStack`Context managers: `…Dataclasses: `field(default_factory=...)`, `__post_init__`, `frozen=True`, generated `__eq__`Dataclasses: `field…The walrus operator `:=`The walrus operator…`match`/`case` structural pattern matching (PEP 634)`match`/`case` stru…f-string `=` debug specifier and the format-spec mini-languagef-string `=` debug …What the GIL actually protects (and what it doesn't)What the GIL actual…threading vs multiprocessing vs asyncio -- when each one actually helpsthreading vs multip…`==` vs `.equals()`, and the String constant pool`==` vs `.equals()`…The `Integer` autobox cache (-128..127)The `Integer` autob…The `hashCode`/`equals` contractThe `hashCode`/`equ…Records: compact constructors, generated equals/hashCode/toStringRecords: compact co…Generics are erased at runtimeGenerics are erased…Bounded wildcards and PECS ("Producer Extends, Consumer Super")Bounded wildcards a…`List.of()` / `Map.of()` are truly immutable`List.of()` / `Map.…Fail-fast iterators: `ConcurrentModificationException` — and when it DOESN'T fireFail-fast iterators…`Comparable` vs `Comparator``Comparable` vs `Co…Streams are lazy: nothing runs until a terminal operationStreams are lazy: n…`Optional`: `orElse` (always evaluated) vs `orElseGet` (lazy)`Optional`: `orElse…Method references: all four kindsMethod references: …`synchronized` and `volatile`: visibility vs. atomicity -- two different problems`synchronized` and …Virtual threads (Project Loom, Java 21) vs. platform threadsVirtual threads (Pr…Checked vs. unchecked exceptions -- the actual compiler-enforced differenceChecked vs. uncheck…try-with-resources, `AutoCloseable`, and suppressed exceptionstry-with-resources,…`var` local type inference (Java 10+)`var` local type in…Switch expressions + pattern matching for switch + `sealed`, working togetherSwitch expressions …Text blocks (`"""`, Java 15+)Text blocks (`"""`,…`java.time` vs. legacy `Date`/`Calendar``java.time` vs. leg…
T1 topic T2 topic T3 topic builds on Python ↔ Java equivalent