Introduction to SSHJ
1. Overview SSHJ is an open-source Java library that uses SSH protocols for secure communication with remote servers. In this article, we’ll go through the basic functionality of the SSHJ library. 2....
View ArticleConvert InputStream to Stream in Java
1. Introduction When dealing with input data across different sources in Java, we sometimes encounter situations where we must handle data from an InputStream by converting it into a...
View ArticleConfiguring Retry Policy for gRPC Request
1. Overview In this tutorial, we’ll discuss the various ways to implement retry policies in gRPC, a remote procedure call framework developed by Google. gRPC is interoperable in many programming...
View ArticleGet the First and the Last Elements From an Array in Java
1. Overview When we work with Java, dealing with arrays is a fundamental task. We often need to access the first and last elements of an array. In this quick tutorial, we’ll explore how to efficiently...
View ArticleIntroduction to JavaParser
1. Introduction In this article, we’re going to have a look at the JavaParser library. We’ll see what it is, what we can do with it, and how to use it. 2. What Is JavaParser? JavaParser is an...
View ArticleFinding the Second Smallest Integer in an Array in Java
1. Introduction In this tutorial, we’ll explore different approaches to finding the second smallest element in an array using Java. 2. Problem Statement Given an array of integers, the task is to find...
View ArticleCheck if a Number Is Power of 2 in Java
1. Introduction A power of 2 is a number that can be expressed as 2 raised to some integer power, such as 2, 4, 8, 16, and so on. In Java, there are several ways to determine if a given number is a...
View ArticleMonads in Java
1. Overview In this tutorial, we’ll learn about monads, and how they can help us deal with effects. We’ll learn about the essential methods enabling us to chain monads and operations: map() and...
View ArticleSupply Enum Value to an Annotation From a Constant in Java
1. Introduction In this tutorial, we’ll explore the possibilities within Java for supplying an enum value from a constant to an annotation. To understand the main drivers of the proposed design...
View ArticleLogging SQL Queries to the Console in Mybatis
1. Overview MyBatis is a popular Java-based persistence framework that simplifies database operations by mapping SQL queries to Java methods. When developing applications using MyBatis, it’s often...
View ArticleGit Integration in IntelliJ IDEA
1. Introduction IntelliJ IDEA offers extensive support for working with the Git version control system. In this tutorial, we’ll look at a selection of features that the IDE provides. Since regular...
View ArticleCheck if Two Strings Are Permutations of Each Other in Java
1. Overview A permutation or anagram is a word or phrase formed by rearranging the letters of a different word or phrase. In other words, a permutation contains the same characters as another string,...
View ArticleUnderstanding Maven Dependency Graph or Tree
1. Overview Working on large Maven projects can be intimidating, as can keeping track of all the dependencies between modules and libraries and resolving conflicts between them. In this tutorial, we’ll...
View ArticleAdd an Aggregation to an Elasticsearch Query
1. Overview Elasticsearch is a search and analytics engine suitable for scenarios requiring flexible filtering. Sometimes, we need to retrieve the requested data and its aggregated information. In this...
View ArticleJava Weekly, Issue 542
1. Spring and Java >> Optimizing JVM for the Cloud: Strategies for Success [infoq.com] The JVM was never designed with the cloud in mind, but it can surely be optimized really well for it...
View ArticleHow to Make Multiple REST Calls in CompletableFuture
1. Introduction When creating software capabilities, an everyday activity is retrieving data from different sources and aggregating it in the response. In microservices, those sources are often...
View ArticleThe Difference Between doAnswer() and thenReturn() in Mockito
1. Overview Mockito is a widely used unit testing framework for Java applications. It provides various APIs to mock the behavior of objects. In this tutorial, we’ll explore the usage of doAnswer() and...
View ArticleHow to Set JVM Arguments in IntelliJ IDEA?
1. Overview IntelliJ IDEA is among the most popular and powerful IDEs for developing software in various programming languages. In this tutorial, we’ll learn how to configure JVM arguments in IntelliJ...
View ArticleExtract Text From a HTML Tag with Regex
1. Introduction When working with HTML content in Java, extracting specific text from HTML tags is common. While using regular expressions (regex) for parsing HTML is generally discouraged due to its...
View Article