Java
JVM internals, the object/memory model, concurrency, and classic design patterns — and how the runtime and idioms differ from Python's.
Questions on the JVM runtime beneath everyday Java — how objects and methods are actually laid out in memory, and the concurrency model, including newer additions like virtual threads. A smaller, growing companion to the Python topic, useful for contrasting the two runtimes directly.
Subtopics
- Language internalsSeniorThe string pool and interning, reflection & metaprogramming, and generics — bounded wildcards and PECS, array covariance, type erasure, and heap pollution.5 concepts
- Memory management & garbage collectionSeniorThe generational heap — Eden, Survivor spaces, and the old generation — mark-sweep-compact, card tables, and the modern low-pause collectors.5 concepts
- Contracts and language gotchasMid / SeniorThe equals/hashCode/compareTo contracts, and the traps that bite in interviews and production: Integer caching, constructor virtual calls, finally, overload resolution, and collection mutation.9 concepts
- Concurrency & threadingSeniorPlatform threads vs virtual threads and why Project Loom changes the cost model, plus the concurrency contracts — synchronized, volatile, double-checked locking, and common races.3 concepts
- Design patternsSeniorObserver and Command, implemented the classic Java way — formal interfaces, explicit Invoker/Receiver roles, and how that compares to Python's duck-typed versions.2 concepts