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

Image may be NSFW.
Clik here to view.

Convert Timestamp String to Long in Java

1. Introduction Working with timеstamps is a common task in Java programming and thеrе arе various scеnarios whеrе we might nееd to convеrt a timеstamp string to a long valuе. In this tutorial, we’ll...

View Article


Image may be NSFW.
Clik here to view.

Time Complexity of Java Collections Sort in Java

1. Introduction In this tutorial, we’ll explore the time complexity of Collections.sort() leveraging the Java Microbenchmark Harness (JMH) and provide examples to illustrate its efficiency. 2. Timе...

View Article


Image may be NSFW.
Clik here to view.

How to Parse XML to HashMap in Java

1. Introduction XML is one of the popular formats for data interchange over the internet. When working with XML data, it’s common to convert it into a more usable format for further processing. In this...

View Article

Image may be NSFW.
Clik here to view.

Difference Between String isEmpty() and isBlank()

1. Introduction Working with Strings in Java is sometimes confusing because we have many ways to do similar things. In this article, we’ll look at how to validate blank and empty Strings using the...

View Article

Image may be NSFW.
Clik here to view.

Asserting Nested Map With JUnit

1. Overview In this tutorial, we’ll go through some of the different ways of asserting the presence of a nested map inside an outer map. Mostly, we’ll discuss the JUnit Jupiter API and the Hamcrest...

View Article


Image may be NSFW.
Clik here to view.

Context-Specific Deserialization Filters in Java 17

1. Introduction In this tutorial, we’ll learn about Java’s new Context-Specific Deserialization Filter functionality. We’ll establish a scenario and then use it in practice to determine what...

View Article

Image may be NSFW.
Clik here to view.

Setting a Spring Bean to Null

1. Overview In this tutorial, we’ll learn how to set beans in the Spring context to nulls. This might be useful in some cases, such as testing when we don’t want to provide mocks. Also, while using...

View Article

Image may be NSFW.
Clik here to view.

Checking if an Object’s Type Is Enum

1. Overview When we work with Java, understanding and manipulating object types are fundamental skills. One common challenge is checking whether an object belongs to an Enum type. In this quick...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 517

1. Spring and Java >> How to cascade DELETE with Spring and Hibernate events [vladmihalcea.com] Taking advantage of Hibernate’s event listeners to cascade a DELETE operation to other entities...

View Article


Image may be NSFW.
Clik here to view.

Gradle Proxy Configuration

1. Overview A proxy server acts as an intermediary between a client and a server. It helps evaluate requests from a client before forwarding them to target servers based on certain criteria. This gives...

View Article

Image may be NSFW.
Clik here to view.

Return First Non-null Value in Java

1. Overview In this tutorial, we’ll learn how to return the first non-null element from a list or sequence of data. We’ll also explore lazy evaluation when returning the first non-null from a chain of...

View Article

Image may be NSFW.
Clik here to view.

Check Certificate Name and Alias in Keystore File

1. Overview In this tutorial, we’ll learn to check certificate names and aliases in a Java keystore file using the Java KeyStore API and the keytool utility. 2. Setup Before describing the two methods,...

View Article

Image may be NSFW.
Clik here to view.

Limiting the Max Size of a HashMap in Java

1. Overview HashMap is a well-known class from the Java Collections library. It implements the Map interface and allows the storage of key-value pairs. An instance of HashMap does not have a limitation...

View Article


Image may be NSFW.
Clik here to view.

Setup Asynchronous Retry Mechanism in Spring

1. Overview Sometimes, we require code execution to be asynchronous for better application performance and responsiveness. Also, we may want to automatically re-invoke the code on any exception, as we...

View Article

Image may be NSFW.
Clik here to view.

Modify Request Body Before Reaching Controller in Spring Boot

1. Overview In this tutorial, we’ll learn how to modify an HTTP request before it reaches the controller in a Spring Boot application. Web applications and RESTful web services often employ this...

View Article


Image may be NSFW.
Clik here to view.

Generating Unique Positive long Using UUID in Java

1. Overview UUID (Universally Unique Identifier) represents a 128-bit number that is designed to be globally unique. In practice, UUIDs are suitable for use in situations that require unique...

View Article

Image may be NSFW.
Clik here to view.

Passing JVM Options from Gradle bootRun

1. Overview Gradle is a multi-purpose automation build tool to develop, compile, and test software packages. It supports a wide range of languages, but primarily, we use it for Java-based languages...

View Article


Image may be NSFW.
Clik here to view.

How to Sort LinkedHashMap By Values in Java

1. Overview Map is a common data type when we need to manage key-value associations. The LinkedHashMap is a popular choice, primarily known for preserving the insertion order. However, in many...

View Article

Image may be NSFW.
Clik here to view.

Convert Long Timestamp to LocalDateTime in Java

1. Introduction Handling timеstamps in Java is a common task that allows us to manipulatе and display datе and timе information morе еffеctivеly еspеcially when we’re dealing with databasеs or еxtеrnal...

View Article

Image may be NSFW.
Clik here to view.

How to Increment a Map Value in Java

1. Introduction In this tutorial, we’ll look at several ways to increment a numerical value associated with a key in a Map. The Maps interface, part of the Collections framework in Java, represents a...

View Article
Browsing all 4535 articles
Browse latest View live


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