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

Image may be NSFW.
Clik here to view.

Spring Kafka Trusted Packages Feature

1. Introduction In this tutorial, we’ll review the Spring Kafka trusted packages feature. We’ll see the motivation behind it, along with its usage. All with practical examples, as always. 2....

View Article


Image may be NSFW.
Clik here to view.

Understanding NewSQL Databases

1. Overview Databases are one of the ways we store collections of data and there are different types of databases available. Different DBMSs, such as SQL and NoSQL databases, became popular based on...

View Article


Image may be NSFW.
Clik here to view.

Verify That Lambda Expression Was Called Using Mockito

1. Overview In this tutorial, we’ll look at how we can test that our code calls a lambda function. There are two approaches to achieving this goal to consider. We’ll first check that the lambda is...

View Article

Image may be NSFW.
Clik here to view.

Deserializing JSON to Java Record using Gson

1. Introduction Thе dеsеrialization procеss involvеs convеrting a JSON rеprеsеntation of an objеct (or data) into an еquivalеnt objеct in a programming languagе, such as a Java objеct. Gson, a popular...

View Article

Image may be NSFW.
Clik here to view.

String vs StringBuffer Comparison in Java

1. Overview String and StringBuffer are two important classes used while working with strings in Java. In simple words, a string is a sequence of characters. For example, “java”, “spring” and so on....

View Article


Image may be NSFW.
Clik here to view.

Static Final Variables in Java

1. Overview Simply put, static final variables, also called constants, are key features in Java to create a class variable that won’t change after initialization. However, in the case of a static final...

View Article

Image may be NSFW.
Clik here to view.

Differences Between Entities and DTOs

1. Overview In the realm of software development, there is a clear distinction between entities and DTOs (Data Transfer Objects). Understanding their precise roles and differences can help us build...

View Article

Image may be NSFW.
Clik here to view.

Handling NullPointerException in findFirst() When the First Element Is Null

1. Overview In this short tutorial, we’ll explore different ways of avoiding NullPointerException when working with the findFirst() method. First, we’ll explain what causes the method to fail with...

View Article


Image may be NSFW.
Clik here to view.

Skip Bytes in InputStream in Java

1. Introduction In Java programming, InputStrеam is a fundamеntal class for rеading bytеs from a sourcе. Howеvеr, thеrе arе scеnarios whеrе it bеcomеs nеcеssary to skip a cеrtain numbеr of bytеs within...

View Article


Image may be NSFW.
Clik here to view.

Unreachable Statements in Java

1. Overview In this tutorial, we’ll talk about the Java specification that states that the compiler should raise an error if any statement is unreachable. An unreachable statement is a code that can...

View Article

Image may be NSFW.
Clik here to view.

Create a Mutable String in Java

1. Introduction In this tutorial, we’ll discuss a few ways to create a mutable String in Java. 2. Immutability of Strings Unlike other programming languages like C or C++, Strings are immutable in...

View Article

Image may be NSFW.
Clik here to view.

Convert a Hex String to an Integer in Java

1. Introduction Converting a hexadecimal (Hex) string into an integer is a frequent task during programming, particularly when handling data types that use hexadecimal notations. In this tutorial,...

View Article

Image may be NSFW.
Clik here to view.

Splitting Streams in Kafka

1. Introduction In this tutorial, we’ll explore how to dynamically route messages in Kafka Streams. Dynamic routing is particularly useful when the destination topic for a message depends on its...

View Article


Image may be NSFW.
Clik here to view.

Comparing the Values of Two Generic Numbers in Java

1. Introduction Java’s versatility is evident in its ability to handle generic Number objects. In this tutorial, we’ll delve into the nuances of comparing these objects, offering detailed insights and...

View Article

Image may be NSFW.
Clik here to view.

Switching Between Frames Using Selenium WebDriver in Java

1. Introduction Managing frames and iframes is a crucial skill for test automation engineers. Selenium WebDriver allows us to work with both frames and iframes in the same way. In this tutorial, we’ll...

View Article


Image may be NSFW.
Clik here to view.

Why Is sun.misc.Unsafe.park Actually Unsafe?

1. Overview Java provides certain APIs for internal use and discourages unnecessary use in other cases. The JVM developers gave the packages and classes names such as Unsafe, which should warn...

View Article

Image may be NSFW.
Clik here to view.

HashSet toArray() Method in Java

1. Introduction HashSet is one of the common data structures that we can utilize in Java Collеctions. In this tutorial, we’ll dive into the toArray() method of the HashSet class, illustrating how to...

View Article


Image may be NSFW.
Clik here to view.

Convert ResultSet Into Map

1. Introduction Java applications widely use the Java Database Connectivity (JDBC) API to connect and execute queries on a database. ResultSet is a tabular representation of the data extracted by these...

View Article

Image may be NSFW.
Clik here to view.

MongoDB Atlas Search Using the Java Driver and Spring Data

1. Introduction In this tutorial, we’ll learn how to use Atlas Search functionalities using the Java MongoDB driver API. By the end, we’ll have a grasp on creating queries, paginating results, and...

View Article

Image may be NSFW.
Clik here to view.

Sharing Memory Between JVMs

1. Introduction In this tutorial, we’ll show how to share memory between two or more JVMs running on the same machine. This capability enables very fast inter-process communication since we can move...

View Article
Browsing all 4535 articles
Browse latest View live


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