Java Fundamentals
The core language and platform: JVM, types, OOP, exceptions, generics, collections.
These topics are the foundation of the Java Developer Fundamentals learning path.
Articles
- Exceptions & try-with-resourcesDesigning and handling exceptions in Java: the Throwable hierarchy, checked vs unchecked, try-catch-finally semantics, try-with-resources and suppressed exceptions, exception translation and chaining, custom exceptions, exceptions in lambdas and CompletableFuture, logging, and API design guidelines.
- Generics & type erasureHow Java generics give compile-time type safety: type parameters, bounded types, generic methods, wildcards and PECS, type erasure and bridge methods, what you cannot do at runtime, heap pollution, and practical API design rules.
- Collections FrameworkHow Java collections work inside: the interface hierarchy and sequenced collections (Java 21), ArrayList vs LinkedList, HashMap internals (hashing, buckets, treeification, resizing), LinkedHashMap and LRU caches, TreeMap, sets, queues and deques, immutable collections, fail-fast iterators, and choosing the right collection.
- Records, sealed & patternsData-oriented programming in modern Java: records, sealed classes and interfaces, pattern matching for instanceof and switch, record patterns, exhaustiveness, unnamed variables, text blocks and var, plus what Java 22–27 added (flexible constructor bodies, module imports, compact source files, primitive patterns in preview).
- Reflection & dynamic proxiesHow Java inspects and changes behaviour at runtime: Class objects, fields, methods, constructors and annotations via reflection, MethodHandles, JDK dynamic proxies vs CGLIB and ByteBuddy, how frameworks like Spring and Hibernate use them, performance, module encapsulation and GraalVM native-image constraints.
Planned topics
These topics are on the roadmap and not written yet. They appear here so you can see the full scope of the section.
- JVM, JRE and JDK
- Compilation and bytecode
- Primitive and reference types
- Classes, objects and constructors
- Interfaces and abstract classes
- Inheritance and composition
- Encapsulation and polymorphism
- Strings and immutability
- Enums and records
- Annotations
- I/O and NIO.2