Count Occurrences Using Java groupingBy Collector
1. Overview In this short tutorial, we'll see how we can group equal objects and count their occurrences in Java. We'll use the groupingBy() collector in Java. 2. Count Occurrences using...
View ArticleJava Weekly, Issue 393
1. Spring and Java >> Quarkus 2.0.0.Final released [quarkus.io] Lots of new and exciting features in Quarkus 2.0 – continuous testing, brand new CLI, more Kotlin friendly, more extensions, and so...
View ArticleFind the GC Algorithm Used by a JVM Instance
1. Overview In addition to typical development utilities such as compiler and runtime, each JDK release is shipped with a myriad of other tools. Some of these tools can help us to gain valuable...
View ArticleList Active Brokers in a Kafka Cluster Using Shell Commands
1. Overview Monitoring an event-driven system that uses the Apache Kafka cluster would often require us to get the list of active brokers. In this tutorial, we'll explore few shell commands to get the...
View ArticleConverting String to BigInteger in Java
1. Overview In this tutorial, we'll demonstrate how we can convert a String to a BigInteger. The BigInteger is commonly used for working with very large numerical values, which are usually the result...
View ArticleTiered Compilation in JVM
1. Overview The JVM interprets and executes bytecode at runtime. In addition, it makes use of the just-in-time (JIT) compilation to boost performance. In earlier versions of Java, we had to manually...
View ArticleAdditional Source Directories in Maven
1. Overview In this tutorial, we'll explain how we can add multiple source directories in the Maven-based Java project. 2. Extra Source Directory Let's assume we need to add a /newsrc source directory...
View ArticleStatic Classes Versus the Singleton Pattern in Java
1. Introduction In this quick tutorial, we'll discuss some eminent differences between programming to the Singleton design pattern and using static classes in Java. We'll review both the coding...
View ArticleConfiguring the Server Port on Quarkus Applications
1. Overview In this quick tutorial, we're going to learn how to configure the server port on Quarkus applications. 2. Configuring Port By default, similar to many other Java server applications,...
View ArticleGuide to Java BigInteger
1. Introduction Java provides some primitives, such as int or long, to perform integer operations. But sometimes, we need to store numbers, which overflow the available limits for those data types. In...
View ArticleForce Repository Update with Maven
1. Overview In this tutorial, we'll learn how to force-update a local Maven repository when it becomes corrupted. To accomplish this, we'll use a straightforward example to understand why a repository...
View ArticleWriting Log Data to Syslog Using Log4j2
1. Overview Logging is a vital component in every application. When we use a logging mechanism in our application, we can store our logs in a file or a database. Additionally, we can send the logging...
View ArticleJava Weekly, Issue 394
1. Spring and Java >> Quarkus & Hibernate – Getting Started [thorben-janssen.com] Developing k8s-native Java apps – a practical guide on using Quarkus and Hibernate together. >>...
View ArticlePlugin Management in Maven
1. Overview Apache Maven is a powerful tool that uses plugins to automate and perform all the build and reporting tasks in a Java project. However, there are likely to be several of these plugins used...
View ArticleCreating a Self-Signed Certificate With OpenSSL
1. Overview OpenSSL is an open-source command-line tool that allows users to perform various SSL-related tasks. In this article, we'll learn how to create a self-signed certificate with OpenSSL. 2....
View ArticleGuava’s Futures and ListenableFuture
1. Introduction Guava provides us with ListenableFuture with an enriched API over the default Java Future. Let's see how we can use this to our advantage. 2. Future, ListenableFuture and Futures Let's...
View ArticleConvert a String to Camel Case
1. Overview Camel case and title case are commonly used as identifiers for fields and types. We may wish to convert text into this format. This can be achieved either by writing custom code or by...
View ArticleWhy Missing Annotations Don’t Cause ClassNotFoundException
1. Overview In this tutorial, we're going to get familiar with a seemingly bizarre feature in the Java Programming language: Missing annotations won't cause any exceptions at runtime. Then, we'll dig...
View ArticleValid @SuppressWarnings Warning Names
1. Overview In this tutorial, we'll take a look at the different warning names that work with the @SuppressWarnings Java annotation, which allows us to suppress compiler warnings. These warning names...
View ArticleSignificance of Getters and Setters in Java
1. Introduction Getters and Setters play an important role in retrieving and updating the value of a variable outside the encapsulating class. A setter updates the value of a variable, while a getter...
View Article