

Languages
Java Mastery
The JVM, OOP, collections, streams and concurrency for Java interviews and jobs.
- Handwritten-style
- Diagrams and tables
- Worked examples
Who this notebook is for
Students and developers preparing for Java interviews or starting a Java job. It begins with how Java runs and builds up to collections and concurrency.
What you will be able to do
- Explain how the JVM loads, compiles and runs your code
- Use classes, interfaces, records and generics correctly
- Choose the right collection and know how a HashMap works inside
- Write simple multithreaded code and explain the memory model
What's inside
Pick a chapter and the notebook opens right there.
- Platform Architecture & JVM InternalsJDK vs JRE vs JVM, ClassLoader Delegation, Tiered JIT C1/C2, Escape Analysis, Bytecode javapStart here
- Language Fundamentals & Type SystemPrimitive Bit Widths, Promotion Rules, Bit-shifts (>>, >>>), Integer Cache (-128..127), BigDecimalStart here
- Control Flow, Loops & Pattern MatchingShort-Circuit Evaluation, Fail-Fast Iterators, Modern Switch Expressions, Pattern instanceof, Guarded PatternsStart here
- Object-Oriented Classes & LifecyclesAccess Modifiers, Constructor Chaining this()/super(), Initialization Order, equals/hashCode Contract, RecordsStart here
- Inheritance & Dynamic DispatchComposition vs Inheritance, Overloading vs Overriding, vtable Dispatch, Covariant Returns, final, Sealed ClassesStart here
- Abstract Classes & InterfacesSkeletal Implementations, Default & Static Methods, Private Methods, Diamond Resolution, Functional InterfacesStart here
- Memory Management & Garbage CollectionEden & Survivor Scavenge, GC Roots, Reference Types, Serial/Parallel/G1GC, ZGC Colored Pointers, Heap DumpsStart here
- String Manipulation & Memory PoolImmutability Security, String Constant Pool, Compact Strings byte[], StringBuilder Growth, Text Blocks (""")Start here
- Exception Handling ArchitectureThrowable Hierarchy, Checked vs Unchecked, try-catch-finally Invariants, try-with-resources, Domain ExceptionsStart here
- Generics & Type ErasureType Erasure, Bridge Methods, Bounded Types, PECS Rule (? extends vs ? super), Generic LimitationsStart here
- Collections: Lists & QueuesArrayList 1.5x Resizing Math, LinkedList Cache Misses, ArrayDeque Circular Buffer, PriorityQueue Binary HeapStart here
- Collections: Maps & SetsHashMap Hash Perturbation, Treeification at 8, ConcurrentHashMap CAS & Bucket Locks, LinkedHashMap LRU, TreeMapStart here
- Functional Programming & Stream APILambda invokedynamic, Method References, Primitive Streams, Lazy Pipelines, Collectors groupingBy, Parallel StreamsStart here
- Multithreading & Memory ModelThread States, JMM Happens-Before, volatile Memory Barriers, synchronized Lock Inflation, wait/notifyAll GuardsStart here
- Modern Concurrency & Virtual ThreadsThreadPoolExecutor Backpressure, CompletableFuture Async, StampedLock Optimistic Reads, Loom Virtual ThreadsStart here
- Java I/O, NIO.2 & SerializationByte/Char Streams, 8KB Buffer Decorators, NIO Channels & Selectors, NIO.2 Path/Files Zero-Copy, Serialization RCEStart here
- Reflection & Dynamic ProxiesReflection API Overhead, JPMS Strong Encapsulation, Custom Annotations, APT Code Gen, JDK vs CGLIB ProxiesStart here
- FAANG Technical Interview PlaybookTricky Java Output Traps, Production JVM Tuning Flags, Deadlock Diagnostics (jstack), Thread-Safe LRU Cache, Staff ChecklistStart here
Practice this
Put it to work on LakeBench.
Common questions
- Is this for beginners or experienced developers?
- It starts from the basics but goes deep on the topics interviews test, so a beginner can start at the front and an experienced developer can jump to a chapter.
- Does it cover modern Java?
- Yes. It includes records, pattern matching, streams and virtual threads alongside the classic topics.
- Can I read a sample before I commit?
- Yes. The contents pages and the first pages of every notebook can be read online, so you can judge the style before going further.
