Part 2. Under the hood

 

This part of the book is all about exploring how the JVM actually works. You’ll start off examining class loading. Many Java developers don’t have a good understanding of how the JVM actually loads, links, and verifies classes. This leads to frustration and wasted time when an “incorrect” version of some class is executed due to some sort of classloader conflict.

Being able to dive into the internals of a Java class file and the bytecode it contains is a powerful debugging skill. You’ll see how to use javap to navigate and understand the meaning of bytecode.

Next, you’ll come to grips with the multicore CPU revolution occurring in hardware. The well-grounded Java developer needs to be aware of Java’s concurrency capabilities. Chapters 5 and 6 will teach you how to get the most out of modern processors. First you’ll look at concurrency theory and the building blocks Java has had for concurrent programming since 2006 (Java 5). You’ll learn about the Java Memory Model and how threading and concurrency is implemented in that model.

Once you have some theory under your belt, we’ll guide you through the features of the java.util.concurrent package, which provides modern structures for practical development of concurrent Java.