Java 8: Creating a custom Collector for your Stream

In the previous post we looked at different implementations of the Collector interface. As you saw, there are a wide range of collectors available out of the box. However — sometimes you need something special that you simply have to make… Read more


Java – Project Lilliput

In 64-bit Hotspot, Java objects have an object header of 128 bits: a 64 bit multi-purpose header (‘mark’ or ‘lock’) word and a 64-bit class pointer. With typical average object sizes of 5-6 words, this is quite significant: 2 of those words are al... (more…)

Read more »

Java Array

We know that variables are used to store data in a Java program. We also know that each variable can store not more than one data item. So, what do we do if we need to store a large number of data items, say 50. Well, we can use 50 variables, one for each... (more…)

Read more »

Analyzing Java memory usage in a Docker container

A few weeks ago I faced an interesting problem trying to analyze a memory consumption in my Java application (Spring Boot + Infinispan) running under Docker. The Xmx parameter was set to 256m, but the Docker monitoring tool displayed almost two...

Read more »