Maven Logging Options
1. Overview In this quick tutorial, we're going to see how to configure logging options in Maven. 2. Command Line By default, Maven only logs the info, warning, and error logs. Also, for errors, it...
View ArticleMemory Address of Objects in Java
1. Overview In this quick tutorial, we're going to see how to find the memory address of objects in Java. Before going any further, it's worth mentioning that the memory layout of runtime data areas is...
View ArticleGarbage Collection and Cyclic References in Java
1. Overview In this quick article, we'll see how the JVM makes sure to collect the unreachable but cyclic references. First, we'll explore different types of GC algorithms. After that, we're going to...
View ArticleVersion Comparison in Java
1. Overview With the advancement of DevOps technologies, it's common to build and deploy an application multiple times in a day. Therefore, every build is assigned a unique version number so we can...
View ArticleClass.isInstance vs Class.isAssignableFrom
1. Introduction In this quick tutorial, we're going to take a look at the difference between Class.isInstance and Class.isAssignableFrom. We'll learn how to use each method and what the differences are...
View ArticleReactive Systems in Java
1. Introduction In this tutorial, we'll understand the basics of creating reactive systems in Java using Spring and other tools and frameworks. In the process, we'll discuss how reactive programming is...
View ArticleListing Docker Containers
1. Overview Docker provides various options to list and filter containers in different states or even options to customize the list output. In this tutorial, we're going to see how we can filter Docker...
View ArticleFinding Top K Elements in an Array
1. Overview In this tutorial, we'll implement different solutions to the problem of finding the k largest elements in an array with Java. To describe time complexity we`ll be using Big-O notation. 2....
View ArticleInterface Segregation Principle in Java
1. Introduction In this tutorial, we'll be discussing the Interface Segregation Principle, one of the SOLID principles. Representing the “I” in “SOLID”, interface segregation simply means that we...
View ArticleJava Weekly, Issue 342
1. Spring and Java >> On Generating Identity Hash Codes [alidg.me] An in-depth take on different strategies used by the HotSpot JVM to generate identity hashcodes. >> Scalability of...
View ArticleDifference Between Statement and PreparedStatement
1. Overview In this tutorial, we'll explore the differences between JDBC‘s Statement and PreparedStatement interfaces. We won't be covering CallableStatement, a JDBC API interface that is used to...
View ArticleGarbage Collection Logging to a File in Java
1. Overview Garbage collection is a marvel of the Java programming language providing us with automatic memory management. Garbage collection hides the details of having to manually allocate and...
View ArticleThe Spring ApplicationContext
1. Overview In this tutorial, we'll look into the Spring ApplicationConext interface in detail. 2. The ApplicationContext Interface One of the main features of the Spring framework is the IoC...
View ArticleJava Generics – vs
1. Overview In this quick tutorial, we'll see the similarities and differences between <?> and <? extends Object> in Java Generics. However, this being an advanced topic, it's imperative to...
View ArticleA Guide to False Sharing and @Contended
1. Overview In this article, we'll see how sometimes false sharing can turn multithreading against us. First, we're going to start with a little bit on the theory of caching and spatial locality. Then...
View ArticleUnit Testing of System.out.println() with JUnit
1. Overview When unit testing we may occasionally want to test the messages that we write to standard output via System.out.println(). Although we'd generally prefer a logging framework over direct...
View ArticleDownload Sources and Javadocs with Maven
1. Overview Peeking at the source code and documentation of different libraries and frameworks is a good way to learn more about them. In this short tutorial, we'll see how to configure Maven, or ask...
View ArticleMaven Offline Mode
1. Overview Sometimes we may need to ask Maven explicitly to not download anything from its repositories for a variety of reasons. In this short tutorial, we're going to see how to enable the offline...
View ArticleHow to Read PEM File to Get Public and Private Keys
1. Overview In public-key cryptography (also known as asymmetric cryptography), the encryption mechanism relies upon two related keys, a public key and a private key. The public key is used to encrypt...
View ArticleAccessing Maven Properties in Java
1. Overview In this short tutorial, we'll take a look at how to use variables defined inside Maven's pom.xml from a Java application. 2. Plugin Configuration Throughout this example, we'll use the...
View Article