Heap, Stack and Metaspace in Java
Where each piece of data actually lives, and what runs out when each area is exhausted.
Core Java, object oriented programming, collections, multithreading and JDBC.
100 notes in 18 topics
Where each piece of data actually lives, and what runs out when each area is exhausted.
The collector reclaims objects that can no longer be reached. Understanding reachability explains both leaks and pauses.
Java can still leak: any object the program keeps reachable but no longer needs. Here is how to find and fix them.
Reflection inspects and manipulates classes at runtime. It powers most frameworks and should be rare in application code.
A dynamic proxy implements an interface at runtime and routes every call through one handler, which is how cross cutting behaviour is added.
Modules add a boundary above packages: a module declares what it needs and what it exposes, and everything else stays private.
A sealed type names exactly which types may extend it, which lets the compiler check that a pattern switch covers every case.
An immutable object cannot change after construction, which removes whole categories of bug at the cost of a little copying.
What changed in each release since Java 8, which old habits it replaces, and what to reach for in new code today.
Addresses, sockets and streams. Underneath every network library in Java is a socket carrying bytes.
Since Java 11 the platform includes a modern HTTP client with synchronous and asynchronous requests and HTTP/2 support.
JDBC is the standard API for talking to a relational database from Java: a connection, a statement, and a result set.