the java(tm) specialists' newsletter features advanced
articles and tips surrounding the java programming language
Serialization Cache 4 days ago Read More
Java's serialization mechanism is optimized for immutable
objects. Writing objects without resetting the stream
causes a memory leak. Writing a changed object twice
results in only the first sta...
Starvation with ReadWriteLocks 50 days ago Read More
In this newsletter we examine what happens when a
ReadWriteLock is swamped with too many reader or writer
threads. If we are not careful, we can cause starvation of
the minority in some versions...
Why 0x61c88647? 66 days ago Read More
Prior to Java 1.4, ThreadLocals caused thread contention,
rendering them useless for performant code. In the new
design, each thread contains its own ThreadLocalMap, thus
improving throughput. H...
Book Review: Effective Java 2nd Edition 113 days ago Read More
Joshua Bloch has at long last published an updated version
of Effective Java. An essential guide for professional
Java programmers who are interested in producing high
quality code, this book is...
Exceptions in Java 177 days ago Read More
In this article, we look at exception handling in Java. We
start with the history of exceptions, looking back at the
precursor of Java, a language called Oak. We see reasons
why Thread.stop() sh...
The Law of the Uneaten Spinach 206 days ago Read More
Imagine a very stubborn father insisting that his equally
stubborn child eat its spinach before going to sleep. In
real life one of the "threads" eventually will give up, but
in Java, the thread...
The Law of Sudden Riches 213 days ago Read More
We all expect faster hardware to make our code execute
faster and better. In this newsletter we examine why this
is not always true. Sometimes the code breaks on faster
servers or executes slowe...
Polymorphism Performance Mysteries Explained 247 days ago Read More
In this newsletter, we reveal some of the polymorphism
mysteries in the JDK. The HotSpot Server Compiler can
distinguish between mono-morphism, bi-morphism and
poly-morphism. The bi-morphism is ...
Polymorphism Performance Mysteries 273 days ago Read More
Late binding is supposed to be a bottleneck in
applications - this was one of the criticisms of
early Java. The HotSpot Compiler is however rather good at
inlining methods that are being called ...