How to implement a generic in memory cache in Java
I would like to show you how to create a pretty simple in memory cache in Java that can hold a single object. This may help you to take some load off your database for example.
I would like to show you how to create a pretty simple in memory cache in Java that can hold a single object. This may help you to take some load off your database for example.
In this short advice I would like to show you how to create null-safe code when working with unset data in a Java Bean or some API that you are using which may return a null reference. It will be an easy to read one liner.
I want to show you how to read all the lines of a file with the Java Non-blocking I/O API (package java.nio) and provide some historical context how this compares to earlier versions of the java.io API.
Let’s have a look at the Java Security MessageDigest class that provides one-way hash functions and how to get individual MessageDigest instances without using Strings for the algorithm names everywhere in our code.