Quantcast
Channel: Baeldung
Browsing all 4588 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Guide to Hibernate’s @TimeZoneStorage Annotation

1. Overview When building our persistence layer with Hibernate and working with timestamp fields, we often need to handle timezone details as well. Since Java 8, the most common approach to represent...

View Article


Image may be NSFW.
Clik here to view.

Writing JDBC ResultSet to an Excel File Using Apache POI

1. Overview Data handling is one of the critical tasks in software development. A common use case is retrieving data from a database and exporting it into a format for further analysis such as Excel...

View Article


Image may be NSFW.
Clik here to view.

Format Output in a Table Format Using System.out

1. Overview In Java applications, it’s often necessary to display data in a table-like format. System.out offers several ways to do this, from simple string concatenation to advanced formatting...

View Article

Image may be NSFW.
Clik here to view.

How to Make a Field Optional in JPA Entity?

1. Overview When working with databases and Spring Data, it’s common to encounter scenarios where not all fields in an entity are necessary for every operation. Therefore, we might want to make some...

View Article

Image may be NSFW.
Clik here to view.

Assert Collection of JSON Objects Ignoring Order

1. Introduction Asserting that collections of JSON objects are equal can be challenging, especially when the order of elements within the collection isn’t guaranteed. While libraries like Jackson and...

View Article


Image may be NSFW.
Clik here to view.

Efficient Way to Insert a Number Into a Sorted Array of Numbers in Java

1. Overview The usage of arrays is very common in programming languages. Inserting and removing elements from an array of numbers is a basic operation we often need. Inserting an element into a sorted...

View Article

Image may be NSFW.
Clik here to view.

How to Handle Alerts and Popups in Selenium

1. Overview In this tutorial, we’ll explore how to handle alerts and popups in Selenium. Alerts and popups are common elements that can interrupt the flow of automated scripts, so managing them...

View Article

Image may be NSFW.
Clik here to view.

Masking a String Except the Last N Characters

1. Overview In Java, we often need to mask a String, for example to hide sensitive information printed in log files or displayed to the user. In this tutorial, we’ll explore how to accomplish this...

View Article


Image may be NSFW.
Clik here to view.

How to Clone a JPA Entity

1. Introduction Cloning a JPA entity means creating a copy of an existing entity. This allows us to make changes to a new entity without affecting the original object. In this tutorial, we’ll explore...

View Article


Image may be NSFW.
Clik here to view.

How to Check if Multiplying Two Numbers in Java Will Cause an Overflow

1. Overview In Java, multiplying two numbers can lead to overflow if the result exceeds the limits of the data type (int or long). Java 8 introduced Math.multiplyExact(), automatically detecting...

View Article

Image may be NSFW.
Clik here to view.

How to Replace Deprecated JWT parser().setSigningKey()

1. Overview The Java JWT (JSON Web Token) library is a tool for creating, parsing, and validating JWT tokens. These tokens secure APIs and web applications and are a common solution for authentication...

View Article

Image may be NSFW.
Clik here to view.

How to Append a Newline to a StringBuilder

1. Overview In this tutorial, we’re going to explore how to append newlines to a StringBuilder. First, we’ll discuss why hard-coding newlines isn’t reliable across operating systems. Then, we’ll dive...

View Article

Image may be NSFW.
Clik here to view.

Handling Kafka Producer TimeOutException with Java

1. Overview In this tutorial, we’ll learn how to handle TimeOutException in Kafka Producer. Firstly, let’s go through possible scenarios when TimeOutException occurs, and then see how to tackle the...

View Article


Image may be NSFW.
Clik here to view.

How to Count Lines of Java Code Using IntelliJ IDEA?

1. Overview IntelliJ IDEA is a popular integrated development environment (IDE) for Java programming. It’s best known for its powerful features and user-friendly interface. To count lines of Java code...

View Article

Image may be NSFW.
Clik here to view.

ChatClient Fluent API in Spring AI

1. Overview In this tutorial, we’ll explore the fluent API of ChatClient, a feature of the Spring AI module version 1.0.0 M1. The ChatClient interface from the Spring AI module enables communication...

View Article


Image may be NSFW.
Clik here to view.

Introduction to Apache Hadoop

1. Introduction Humanity produces staggering amounts of data daily with the world more connected than ever through social media platforms, messaging apps, and audio/video streaming services. Therefore,...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 562

1. Spring and Java >> AI Meets Spring Petclinic: Implementing an AI Assistant with Spring AI (Part I) [spring.io] Incorporating an AI assistant that allows users to interact with the application...

View Article


Image may be NSFW.
Clik here to view.

Understanding Ramp-up in JMeter

1. Overview JMeter is a very popular solution for testing the performance of JVM applications. One problem we often face in JMeter is how to control the amount of requests we make in a given time....

View Article

Image may be NSFW.
Clik here to view.

Monitor Java Application Logs With Loggly

1. Overview In this tutorial, we’ll walk through the steps to configure SolarWinds Loggly, a cloud-based log management tool, for Java applications using various logging libraries. We’ll also learn how...

View Article

Image may be NSFW.
Clik here to view.

Mocking an Enum Using Mockito

1. Overview An enum is a special type of class that extends the Enum class. It consists of a group of static final values, which makes them unchangeable. Furthermore, we use enums to define a set of...

View Article
Browsing all 4588 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>