Understanding the & 0xff Value in Java
1. Overview 0xff is a number represented in the hexadecimal numeral system (base 16). It's composed of two F numbers in hex. As we know, F in hex is equivalent to 1111 in the binary numeral system. So,...
View ArticleDistributed Performance Testing with JMeter
1. Overview In this article, we'll explore distributed performance testing using JMeter. 2. What is Distributed Performance Testing? Distributed performance testing means using multiple systems with...
View ArticleThe transient Keyword in Java
1. Introduction In this article, we'll first understand the transient keyword, and then we'll see its behavior through examples. 2. Usage of transient Let's first understand the serialization before...
View ArticleJava Weekly, Issue 358
1. Spring and Java >> From Reactor to Coroutines [blog.frankel.ch] A practical take on how to migrate from Project Reactor to Kotlin coroutines: R2DBC and coroutine repositories, web handers and...
View ArticleJava (String) or .toString()?
1. Introduction In this article, we'll provide a brief explanation of the differences between String casting and executing the toString() method. We'll briefly review both syntaxes and go through an...
View ArticleExtending Enums in Java
1. Overview The enum type, introduced in Java 5, is a special data type that represents a group of constants. Using enums, we can define and use our constants in the way of type safety. It brings...
View ArticleCheck if a Java Program Is Running in 64-Bit or 32-Bit JVM
1. Overview Although Java is platform-independent, there are times when we have to use native libraries. In those cases, we might need to identify the underlying platform and load the appropriate...
View ArticleFunctional Programming in Java
1. Introduction In this tutorial, we'll understand the functional programming paradigm's core principles and how to practice them in the Java programming language. We'll also cover some of the advanced...
View ArticleJava IndexOutOfBoundsException “Source Does Not Fit in Dest”
1. Overview In Java, making a copy of a List can sometimes produce an IndexOutOfBoundsException: “Source does not fit in dest”. In this short tutorial, we're going to look at why we get this error when...
View ArticleLocalizing Exception Messages in Java
1. Overview Exceptions in Java are used to signal that something has gone wrong in a program. In addition to throwing the exception, we can even add a message to provide additional information. In this...
View ArticleIgnoring Fields With the JPA @Transient Annotation
1. Introduction When persisting Java objects into database records using an Object-Relational Mapping (ORM) framework, we often want to ignore certain fields. If the framework is compliant with the...
View ArticleSealed Classes and Interfaces in Java 15
1. Overview The release of Java SE 15 introduces sealed classes (JEP 360) as a preview feature. This feature is about enabling more fine-grained inheritance control in Java. Sealing allows classes and...
View ArticleCreating a Discord Bot with Discord4J + Spring Boot
1. Overview Discord4J is an open-source Java library that can primarily be used to quickly access the Discord Bot API. It heavily integrates with Project Reactor to provide a completely non-blocking...
View ArticleAccessing Spring Boot Logs in Docker
1. Overview In this tutorial, we'll explain how to access Spring Boot logs in Docker, from local development to sustainable multi-container solutions. 2. Basic Console Output To begin with, let's build...
View ArticleSetting Memory And CPU Limits In Docker
1. Overview There are many cases in which we need to limit the usage of resources on the docker host machine. In this tutorial, we'll learn how to set the memory and CPU limit for docker containers. 2....
View ArticleJPA CascadeType.REMOVE vs orphanRemoval
1. Overview In this tutorial, we'll be discussing the difference between two of the options we have for removing entities from our databases when working with JPA. First, we'll start with...
View ArticleJava Weekly, Issue 359
1. Spring and Java >> R2DBC joins Reactive Foundation [r2dbc.io] A good day for open standards: Reactive Relational Database Connectivity (R2DBC) joins the Reactive Foundation! >> The...
View ArticleDispatcherServlet and web.xml in Spring Boot
1. Overview The DispatcherServlet is the front controller in Spring web applications. It's used to create web applications and REST services in Spring MVC. In a traditional Spring web application, this...
View ArticleMaven Packaging Types
1. Overview The packaging type is an important aspect of any Maven project. It specifies the type of artifact the project produces. Generally, a build produces a jar, war, pom, or other executable....
View ArticleDefining Indexes in JPA
1. Introduction In this tutorial, we'll discuss defining indexes using JPA's @Index annotation. Through examples, we'll learn how to define our first index using JPA and Hibernate. After that, we're...
View Article