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

Image may be NSFW.
Clik here to view.

Download File from S3 Given a URL

1. Introduction In today’s software landscape, interacting with cloud storage services such as Amazon Simple Storage Service (S3) has become a fundamental aspect of many applications. One common...

View Article


Image may be NSFW.
Clik here to view.

Find the Length of the Longest Symmetric Substring

1. Introduction Determining the length of the longest symmetric substring poses a common challenge in string manipulation tasks. In this tutorial, we’ll discuss two Java approaches for efficiently...

View Article


Image may be NSFW.
Clik here to view.

Print the Default Value When Overriding toString() Method

1. Introduction We can use the toString() method in Java to return a string representation of an object. Often, it’s overridden to provide a meaningful description of the object’s state. However,...

View Article

Image may be NSFW.
Clik here to view.

Finding the Redirected URL of a URL in Java

1. Introduction Understanding how URLs are redirected is crucial in web development and network programming tasks, such as handling HTTP redirects, validating URL redirects, or extracting final...

View Article

Image may be NSFW.
Clik here to view.

Different Ways to Use Limit and Skip in MongoRepository

1. Introduction When working with MongoDB in Spring Data, the MongoRepository interface provides a simple way to interact with MongoDB collections using built-in methods. In this quick tutorial, we’ll...

View Article


Image may be NSFW.
Clik here to view.

Find the Date of Easter Sunday for the Given Year

1. Overview In this tutorial, we’ll understand why the Easter date is complex to compute. Then, we’ll implement three algorithms to calculate it in Java: the Gauss, Butcher-Meeus, and Conway...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 538

1. Spring and Java >> JEP 473: Stream Gatherers (Second Preview) [openjdk.org] The second preview of Stream Gatherers in Java 23 — going beyond pre-defined intermediate operations in Stream API...

View Article

Image may be NSFW.
Clik here to view.

Introduction to Simple Java Mail

1. Introduction Simple Java Mail is a popular open-source library that simplifies sending emails in Java applications. It provides a user-friendly API compared to the standard JavaMail API, allowing us...

View Article


Image may be NSFW.
Clik here to view.

“Not a Managed Type” Exception in Spring Data JPA

1. Overview When using Spring Data JPA we may encounter issues during the bootstrap time. Some of the beans may not be created, causing the application not to start. While the actual stack trace may...

View Article


Image may be NSFW.
Clik here to view.

Compress and Create a Byte Array Using GZip

1. Overview The GZIP format is a file format used in data compression. The GZipInputStream and GZipOutputStream classes of the Java language implement this file format. In this tutorial, we’ll learn...

View Article

Image may be NSFW.
Clik here to view.

Implement Update-Or-Insert in Spring Data JPA

1. Introduction In application development, the need to perform an update-or-insert operation, also known as “upsert”, is quite common. This operation involves putting a new record into a database...

View Article

Image may be NSFW.
Clik here to view.

Difference Between Casting to String and String.valueOf()

1. Overview Manipulating Strings is a fundamental task when we work with Java. We often need to convert other data types into Strings. Two common approaches for accomplishing this are casting to String...

View Article

Image may be NSFW.
Clik here to view.

Implement the Builder Pattern in Java 8

1. Introduction In our journey through software development, we often encounter scenarios where creating objects with numerous properties becomes intimidating. Cluttering our constructors is making our...

View Article


Image may be NSFW.
Clik here to view.

Convert String to OffsetDateTime

1. Introduction Dealing with date and time values is a common task in software development, especially when building applications that involve scheduling, logging, or any time-sensitive operations. In...

View Article

Image may be NSFW.
Clik here to view.

PersistenceUnit vs. PersistenceContext

 1. Overview Persistence context and persistence unit are two important concepts in JPA that we use to manage the lifecycle of entities in an application. In this tutorial, we’ll take a look at a brief...

View Article


Image may be NSFW.
Clik here to view.

Calculating Moving Averages in Java

1. Overview Moving averages are a fundamental tool in analyzing trends and patterns in data and are widely used in finance, economics, and engineering. They help smooth out short-term fluctuations and...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 539

1. Spring and Java >> A preview of Jakarta Data 1.0 (Part II) [in.relation.to] Another new persistence specification for Java: exploring some dynamic features of Jakarta Data like static...

View Article


Image may be NSFW.
Clik here to view.

Finding the nth Last Occurrence of char in String

1. Introduction In various text processing tasks, it’s common to encounter scenarios where we need to find the nth last occurrence of a specific character within a given string. Moreover, this...

View Article

Image may be NSFW.
Clik here to view.

BigDecimal equals() vs. compareTo()

1. Overview Correctly handling numbers is crucial to any programming language. However, some applications rely more on the exact values and require a better representation of decimal numbers. For...

View Article

Image may be NSFW.
Clik here to view.

Unit Test for hashCode() in Java

1. Introduction In Java, we can use the hashCode() method to generate a hash code value for an object. This value is typically used for various purposes, such as storing objects in collections like...

View Article
Browsing all 4535 articles
Browse latest View live


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