Solving Rod Cutting Problem in Java
1. Overview The Rod Cutting Problem is a classic optimization problem that involves finding the best way to cut a rod into pieces to maximize the total revenue. In this tutorial, we’ll understand the...
View ArticleFind The Largest Number in a String
1. Introduction Often, when working with several programming scenarios, there will be strings that contain numbers, and it might be necessary to find the greatest among these values. In this tutorial,...
View ArticleCompletableFuture runAsync() vs. supplyAsync() in Java
1. Introduction Java’s CompletableFuture framework provides powerful asynchronous programming capabilities, facilitating the execution of tasks concurrently. In this tutorial, we’ll delve into two...
View ArticleA Guide to etcd
1. Introduction In the complex world of distributed systems, ensuring efficient data management is crucial. Distributed reliable key-value stores play a pivotal role in maintaining data consistency and...
View ArticleCheck if a String Is Equal to Its Mirror Reflection
1. Overview When we work in Java, String manipulation and comparison are everyday tasks. In this quick tutorial, let’s delve into an interesting problem: checking if a String equals its mirror...
View ArticleGet a Range of Items from a Stream in Java
1. Overview Introduced in Java 8, the Stream API has revolutionized how developers work with object collections. Streams provide powerful operations to process and manipulate data concisely and...
View ArticleCalling Custom Database Functions With JPA and Spring Boot
1. Overview Database functions are essential components in database management systems, enabling the encapsulation of logic and execution within the database. They facilitate efficient data processing...
View ArticleDifference Between thenApply() and thenApplyAsync() in CompletableFuture
1. Introduction In the CompletableFuture framework, thenApply() and thenApplyAsync() are crucial methods that facilitate asynchronous programming. In this tutorial, we’ll delve into the differences...
View ArticleCheck if Two Strings Are Rotations of Each Other
1. Overview In this tutorial, we’ll learn how to check if a string is a rotation of another string. We’ll briefly discuss what string rotation is. Then, we’ll look at some algorithms to solve the...
View ArticleCheck if String is Base64 Encoded
1. Introduction In Java programming, we quite often work with data encoding and decoding. Additionally, Base64 encoding is popular and used to convert binary data into ASCII text format. In this...
View ArticleInstall OpenJDK on Windows
1. Overview Java plays a pivotal role in modern software development, empowering many applications and systems. To harness the power of Java on our machine, we need to install the Java Development Kit...
View ArticleOAuth2 Backend for Frontend With Spring Cloud Gateway
1. Overview In this tutorial, we’ll implement the OAuth2 Backend for Frontend (BFF) pattern with Spring Cloud Gateway and spring-addons. If we inspect any of the major websites known for using OAuth2...
View ArticleSimple Web Server in Java 18
1. Overview Starting in Java 18 we’ve access to the Simple Web Server, which was introduced in JEP 408. We can access its functionality through a command line tool and an API. The Simple Web Server...
View ArticleMessage Acknowledgement in Spring Cloud AWS SQS v3
1. Overview Acknowledgment of messages is a standard mechanism within messaging systems, signaling to the message broker that the message has been received and should not be delivered again. In...
View ArticleFind an Unique Email Address in a List
1. Introduction Email addresses make application software more efficient in user identification and communication. In the case of a list of email addresses, the distinction between unique addresses and...
View ArticleCreate JavaType From Class with Jackson
1. Introduction While working with Jackson, we might face situations where we’ll have to produce a JavaType from the given Class object. In this tutorial, we’ll see how to create a JavaType from a...
View ArticleIncrease the Memory Size Limit on IntelliJ IDEA
1. Overview IntelliJ IDEA is a popular integrated development environment (IDE) with robust features and capabilities. However, as projects become complex, we may encounter scenarios in which the...
View ArticleHow to Pretty-Print a Map in Java
1. Introduction Pretty-printing a Map in Java involves formatting and displaying the key-value pairs of the map in a visually appealing and readable manner. While Java doesn’t provide a built-in method...
View ArticleWorking With Microsoft Excel in Java
1. Overview In this tutorial, we’ll demonstrate the use of the Apache POI, JExcel, and Fastexcel APIs for working with Excel spreadsheets. These libraries can be used to dynamically read, write and...
View Article@DataJpaTest and Repository Class in JUnit
1. Introduction When working with Spring Boot applications that utilize Spring Data JPA for data persistence, it’s crucial to test the repositories that interact with the database. In this tutorial,...
View Article