Learning Java

Divide a list to lists of n size in Java 8

Every Java developer works with lists daily. There are many popular list (or collection) operations implemented in the standard Java 8 library, but there is one that is useful and commonly used, yet missing - partitioning. In this blog post, I would like to show you how you can split any list into chunks of fixed size without using any 3rd party library. Let’s start!

GraalVM and heap size of the native image - how to set it?

In this short blog post, I would like to show you how to set a heap size of the application executed from the native image generated with GraalVM. We will also take a quick look at the effects caused the maximum heap size change.

Installing GraalVM EE 1.0.0-RC14 with SDKMAN!

I love SDKMAN!. It made using multiple different Java distributions in a single operating system much more comfortable. You can install Java across different versions (from 6 to 13.EA) and different vendors (OpenJDK, Oracle, Zulu, Corretto or GraalVM CE to name a few). Switching between those versions is as simple as executing a single sdk use java {version} command and you are ready to use whatever Java you want. However, not all Java versions are available by default, but luckily, SDKMAN! has a simple solution to this problem.

Java 8 type inference in generic methods chain call - what might go wrong?

Yesterday I have found this interesting question on Stack Overflow asked by Opal. He faced some unexpected compilation errors when dealing with Java generics and Vavr library. It turned out the root cause of the issue there was not the library, but Java compiler itself. This was pretty interesting use case and it motivated me to investigate it even further. This blog post reveals untold truth about Java generics type inference. Are you ready? :)

Divide a list to lists of n size in Java 8

Every Java developer works with lists daily. There are many popular list (or collection) operations implemented in the standard Java 8 library, but there is one that is useful and commonly used, yet missing - partitioning. In this blog post, I would like to show you how you can split any list into chunks of fixed size without using any 3rd party library. Let’s start!

Related YouTube videos