Reverse Row of a 2d Array in Java
1. Introduction In this tutorial, we’ll understand the problem of reversing rows of a 2d array and solve it using a few alternatives using built-in Java libraries. 2. Understanding the Problem Using 2d...
View ArticleEnsuring Type Safety With Collections.checkedXXX() in Java
1. Introduction In this article, we’ll explore the Collections.checkedXXX() methods, demonstrating how they can help catch type mismatches early, prevent bugs, and enhance code maintainability. In...
View ArticleGetting Request Payload from POST Request in Java Servlet
1. Introduction Extracting payload data from the request body effectively is crucial for Java servlets, which act as server-side components handling incoming HTTP requests. This guide explores various...
View ArticlePGP Encryption and Decryption Using Bouncy Castle
1. Overview Security is paramount in software applications where encryption and decryption of sensitive and personal data are basic requirements. All of these cryptographic APIs are included with the...
View ArticleDynamic Client Registration in Spring Authorization Server
1. Introduction The Spring Authorization Server comes with a range of sensible defaults that allow us to use it with almost no configuration. This makes it a great choice for using with client...
View ArticleHow to Retrieve a List of Available Folders in a Mail Account Using JavaMail
1. Overview Email management often involves developers working with email folders to organize, read, and manage emails. Using the JavaMail API, retrieving a list of available folders from a mail...
View ArticleChecking if a StringBuilder is Null or Empty
1. Overview StringBuilder allows us to build String values efficiently and conveniently. When working with StringBuilder in Java, there are situations where we need to verify whether it is null or...
View ArticleUsing Amazon Textract in Spring Boot to Extract Text From Images
1. Overview Businesses often need to extract meaningful data from various types of images, such as processing invoices or receipts for expense tracking, identity documents for KYC (Know Your Customer)...
View ArticleSpring Cloud Function for Azure Function
1. Overview In this tutorial, we’ll learn how to use the Spring Cloud Function(SCF) framework to develop Java applications that can be deployed in Microsoft Azure Functions. We’ll discuss its key...
View ArticleHow to Fix the “Could not create the Java Virtual Machine” Error
1. Overview Java programs run on a JVM (Java Virtual Machine), allowing them to run almost everywhere, from application servers to mobile phones. If Java is installed properly, we can run applications...
View ArticleAnnotation Based HTTP Filters in Micronaut
1. Overview In this tutorial, we’ll go through the annotated HTTP filters the Micronaut framework provides. Initially, HTTP filters in Micronaut were closer to the Java EE Filter interface and the...
View ArticleThe Road to All Access for Courses
I just wrote The Road to Membership and Baeldung Pro a few days ago. Yes, it’s been a busy week The TLDR The TLDR is a major change to how we sell courses – we finally have a subscription with access...
View ArticleChanging Spring Boot Properties at Runtime
1. Overview Dynamically managing application configurations can be a critical requirement in many real-world scenarios. In microservices architectures, different services may require on-the-fly...
View ArticleHow to Generate a Random Byte Array of N Bytes
1. Overview There are multiple ways to generate random byte arrays, each suited to different needs. In this tutorial, we’ll explore three approaches: using the built-in java.util.Random class, the...
View ArticleHow to Read a Message From a Specific Offset in Kafka
1. Overview Kafka is a popular open-source distributed message streaming middleware that decouples message producers from message consumers. It decouples them using the publish-subscribe pattern. Kafka...
View ArticleFind the Length of the Largest Subarray With Zero Sum in Java
1. Overview Finding the largest subarray with a sum of zero is a classic problem that can be tackled efficiently using a HashMap. In this tutorial, we’ll walk through a detailed step-by-step approach...
View ArticleHow to Generate PDF With Selenium
1. Overview In this tutorial, we’ll explore how to generate a PDF file from a web page using the print() method available in the ChromeDriver class of Selenium 4. The print() method provides a...
View ArticleHow to Build Multi-Module Maven Projects in Docker
1. Overview In this tutorial, we’ll learn how to efficiently build Docker images for multi-module Maven projects. We’ll start by exploring multi-stage Docker builds to leverage Docker’s caching...
View ArticleExcluding Transitive Dependencies in Gradle
1. Overview Gradle is a build automation tool for managing and automating the process of building, testing, and deploying applications. Using a domain-specific language (DSL) based on Groovy or Kotlin...
View ArticleUsing Google Cloud Firestore Database in Spring Boot
1. Overview Today, cloud-hosted managed databases have become increasingly popular. One such example is Cloud Firestore, a NoSQL document database offered by Firebase and Google, which provides...
View Article