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

Image may be NSFW.
Clik here to view.

Convert TemporalAccessor to LocalDate

1. Introduction Dealing with date and time values is a common task. Sometimes, we may need to convert a TemporalAccessor object to a LocalDate object to perform date-specific operations. Hence, this...

View Article


Image may be NSFW.
Clik here to view.

Get a Path to a Resource in a Java JAR File

1. Introduction Resources within a JAR file are typically accessed using a path relative to the root of the JAR file in Java. Furthermore, it’s essential to understand how these paths are structured to...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 536 – Java keeps evolving through JEPs

1. Spring and Java >> Code Before super() – JEP 447 [javaspecialists.eu] A revolution is coming to Java! Soon, you will be able to add custom code before a super() call >> Java users on...

View Article

Image may be NSFW.
Clik here to view.

Internet Address Resolution SPI in Java

1. Introduction In this tutorial, we’ll discuss Java’s JEP 418, which establishes a new Service Provider Interface (SPI) for Internet host and address resolution. 2. Internet Address Resolution Any...

View Article

Image may be NSFW.
Clik here to view.

Logging in Apache Camel

1. Overview Logging is essential in software development as it aids in recording every footprint of an application. It helps with tracking the activities and state of an application. Essentially, it’s...

View Article


Image may be NSFW.
Clik here to view.

Mapping Enum With MapStruct

1. Introduction In this tutorial, we’ll learn how to map one enum type to another using MapStruct, mapping enums to built-in Java types such as int and String, and vice versa. 2. Maven Let’s add the...

View Article

Image may be NSFW.
Clik here to view.

Disable @EnableScheduling on Spring Tests

1. Introduction In this tutorial, we’ll dive into the topic of testing Spring applications which utilize scheduled tasks. Their extensive usage might cause a headache when we try to develop tests,...

View Article

Image may be NSFW.
Clik here to view.

Multiple-Level Mock Injection Into Mockito Spy Objects

1. Overview In this tutorial, we’ll discuss the well-known Mockito annotations @InjectMock, @Mock, @Spy and understand how they work together in multiple-level injection scenarios. We’ll talk about...

View Article


Image may be NSFW.
Clik here to view.

Immutable vs Unmodifiable Collection in Java

1. Introduction In this tutorial, we’re looking into two flavors of collections in addition to the common Collection classes we have in Java. As we know, we have three core collection classes: Map,...

View Article


Image may be NSFW.
Clik here to view.

Opening HTML File Using Java

1. Introduction In various Java applications, HTML files are often needed to be programmatically opened and displayed. Java provides several methods to accomplish this task, whether it’s for generating...

View Article

Image may be NSFW.
Clik here to view.

Statements Before super() in Java

1. Introduction In Java programming, we use the super() keyword to invoke the superclass constructor. However, there are specific rules regarding the placement of statements before the super() call...

View Article

Image may be NSFW.
Clik here to view.

Disable @Cacheable in Spring Boot

1. Introduction Caching is an effective strategy to improve performance by avoiding repeated execution of logic when the execution result hasn’t changed (effectively the same) for a known period....

View Article

Image may be NSFW.
Clik here to view.

Refresh and Fetch an Entity After Save in JPA

1. Introduction Java Persistence API (JPA) acts as a bridge between Java objects and relational databases, allowing us to persist and retrieve data seamlessly. In this tutorial, we’ll explore various...

View Article


Image may be NSFW.
Clik here to view.

Commit Offsets in Kafka

1. Overview In Kafka, consumers read messages from partitions. While reading messages, there are some concerns to consider, like determining which messages to read from the partitions or, preventing...

View Article

Image may be NSFW.
Clik here to view.

Find the Largest Number Possible After Removing k Digits of a Number

1. Overview In this tutorial, we’ll see different algorithms allowing us to find the largest number possible after removing the k digits of a number. First, we’ll explain the problem. Then, we’ll see...

View Article


Image may be NSFW.
Clik here to view.

Calculate Percentiles in Java

1. Overview When it comes to analyzing data in Java, calculating percentiles is a fundamental task in understanding the statistical distribution and characteristics of a numeric dataset. In this...

View Article

Image may be NSFW.
Clik here to view.

Adding Elements to a Collection During Iteration

1. Introduction Iterating over a List is a common operation in Java, but adding elements to it while iterating requires careful consideration to avoid exceptions and ensure the correctness of the code....

View Article


Image may be NSFW.
Clik here to view.

Representation of Integers at a Bit Level in Java

1. Overview Java stores numbers in memory as binary. Understanding how integers are represented at the bit level can help us with certain operations. In this tutorial, we’ll look at some of the...

View Article

Image may be NSFW.
Clik here to view.

Querydsl vs. JPA Criteria

1. Overview Querydsl and JPA Criteria are popular frameworks for constructing type-safe queries in Java. They both provide ways to express queries statically typed, making it easier to write efficient...

View Article

Image may be NSFW.
Clik here to view.

Dynamically Managing Kafka Listeners in Spring Boot

1. Overview In today’s event-driven architectures, managing data streams effectively is essential. Apache Kafka is a popular choice for this, but integrating it into our applications has its...

View Article
Browsing all 3590 articles
Browse latest View live


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