Java Cup
Inside Java

News and views from members of the Java team at Oracle

Principles of Memory Management in Java

Java programs use garbage collection, and the JDK offers several collectors with different characteristics. But they also share important design choices that distinguish them from garbage collectors in other languages—choices every Java developer should understand.

In this talk, we’ll explore why the JDK’s garbage collectors work the way they do and how Java memory management affects application performance. We’ll look at the sometimes non-obvious relationship between RAM and CPU, and why they must always be considered together.

Finally, we’ll ask: is Java wasteful because it uses too much memory—or are other languages wasteful because they use too little?

Make sure to check the JavaOne 2026 playlist.