Nieuws

The agent class above exposes a statically available method for accessing Instrumentation.getObjectSize(Object). The next code listing demonstrates a simple ‘application’ that makes use of it.
Java reference objects make caching easy Reference objects aren't just useful when memory is at a premium; they can also be used to provide slick caching abilities to any application.
You might know that Java passes by value, but it helps to understand why. Here's what happens when you pass mutable and immutable object references in Java.