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

Image may be NSFW.
Clik here to view.

Java 8 Stream Operation on the Empty List

1. Introduction Java 8 brought a paradigm shift in the way we handle collections and data manipulation with the introduction of Streams. Stream APIs offer a concise and expressive way to perform...

View Article


Image may be NSFW.
Clik here to view.

Add Authorities as Custom Claims in JWT Access Tokens in Spring Authorization...

1. Overview Adding custom claims to JSON Web Token (JWT) access tokens can be crucial in many scenarios. Custom claims allow us to include additional information in the token payload. In this tutorial,...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 524

1. Spring and Java >> Architecting with Java Persistence: Patterns and Strategies [infoq.com] Exploring different Java persistence patterns — plain driver-based approaches, active records and...

View Article

Image may be NSFW.
Clik here to view.

Replace Non-Printable Unicode Characters in Java

1. Introduction Non-printable Unicode characters are control characters, style markers, and other invisible symbols that we can find in text but aren’t meant to show. Besides, these letters can cause...

View Article

Image may be NSFW.
Clik here to view.

Converting Integer to BigDecimal in Java

1. Overview BigDecimal is designed to work with large floating point numbers. It solves the problem with floating point arithmetic and provides a way to control the precision. Additionally, it has...

View Article


Image may be NSFW.
Clik here to view.

Call a Method on Each Element of a List in Java

1. Overview When we work with Java, whether we’re working with pre-Java 8 code or embracing the functional elegance of the Stream API in Java 8 and beyond, calling a method on each element of a list is...

View Article

Image may be NSFW.
Clik here to view.

Create Kubernetes Operators with the Java Operator SDK

1. Introduction In this tutorial, we’ll present the concept of Kubernetes operators and how we can implement them using the Java Operator SDK. To illustrate this, we’ll implement an operator that...

View Article

Image may be NSFW.
Clik here to view.

Converting Integer to BigDecimal in Java

1. Overview BigDecimal is designed to work with large floating point numbers. It solves the problem with floating point arithmetic and provides a way to control the precision. Additionally, it has...

View Article


Image may be NSFW.
Clik here to view.

Convert Joda-Time DateTime to Date and Vice Versa

1. Introduction Joda-Time is a very popular Java library concerning date and time manipulation. It gives a much more intuitive and flexible API than that usually offered by the standard DateTime class....

View Article


Image may be NSFW.
Clik here to view.

Solving the ParameterResolutionException in JUnit 5

1. Overview JUnit 5 introduced some powerful features, including support for parameterized testing. Writing parameterized tests can save a lot of time, and in many cases, they can be enabled with a...

View Article

Image may be NSFW.
Clik here to view.

Using a Custom TrustStore in Java

1. Introduction In this tutorial, we’re going to take a look at how to use custom TrustStore in Java. We’re going first to override the default TrustStore and then explore the ways to combine...

View Article

Image may be NSFW.
Clik here to view.

What Is the Error: “Non-static method cannot be referenced from a static...

1. Overview When we work with Java, we often run into problems that demand a deeper understanding of the language’s intricacies. One common puzzle is the error message: “Non-static method … cannot be...

View Article

Image may be NSFW.
Clik here to view.

Difference Between flush() and close() in Java FileWriter

1. Overview File handling is an essential aspect we frequently encounter. When it comes to writing data to files, the FileWriter class is commonly used. Within this class, two important methods,...

View Article


Image may be NSFW.
Clik here to view.

Maven Dependencies Failing With a 501 Error “HTTPS Required”

1. Overview In this tutorial, we’ll learn about the error “Return code is: 501, ReasonPhrase: HTTPS Required”. We’ll start by understanding what this error means, and then explore the steps to resolve...

View Article

Image may be NSFW.
Clik here to view.

Read Input Character-by-Character in Java

1. Introduction In many Java applications, we need to read the input data character by character since it is a common task, especially when working with lots of data from a stream source. In this...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 525

1. Spring and Java >> The best way to test the data access layer [vladmihalcea.com] Evaluating the pros and cons of different approaches of testing data access layers: unit testing vs...

View Article

Image may be NSFW.
Clik here to view.

Check if a Float Value is Equivalent to an Integer Value in Java

1. Introduction The floating-point numbers are typically represented using Java’s float or double data type. However, precision imposes a limitation as they use binary representations of these values....

View Article


Image may be NSFW.
Clik here to view.

Using Static Methods Instead of Deprecated JsonParser

1. Introduction Efficient JSON parsing is one of the most important tasks in Java programming when it comes to data manipulation and communication. The Gson library offers a versatile JsonParser class...

View Article

Image may be NSFW.
Clik here to view.

Global Exception Handling with Spring Cloud Gateway

1. Overview In this tutorial, we’ll explore the nuances of implementing a global exception-handling strategy within Spring Cloud Gateway, delving into its technicalities and best practices. In modern...

View Article

Image may be NSFW.
Clik here to view.

PriorityQueue iterator() Method in Java

1. Introduction One of the essential methods in PriorityQueue is the iterator() method. This method allows seamless traversal of the elements stored in the queue. In this tutorial, we’ll explore the...

View Article
Browsing all 4535 articles
Browse latest View live


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