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

Image may be NSFW.
Clik here to view.

Get the Last Word of a String

1. Overview In this short tutorial, we'll learn how to get the last word of a String in Java using two approaches. 2. Using the split() Method The split() instance method from the String class splits...

View Article


Image may be NSFW.
Clik here to view.

Using a Custom Class as a Key in a Java HashMap

1. Overview In this article, we'll learn how HashMap internally manages key-value pairs and how to write custom key implementations. 2. Key Management 2.1. Internal Structure Maps are used to store...

View Article


Image may be NSFW.
Clik here to view.

Error Handling in gRPC

1. Overview gRPC is a platform to do inter-process Remote Procedure Calls (RPC). It's highly performant and can run in any environment. In this tutorial, we'll focus on gRPC error handling using Java....

View Article

Image may be NSFW.
Clik here to view.

Hibernate’s “Object References an Unsaved Transient Instance” Error

1. Overview In this tutorial, we'll see how to solve a common Hibernate error – “org.hibernate.TransientObjectException: object references an unsaved transient instance”. We get this error from the...

View Article

Image may be NSFW.
Clik here to view.

Generate a WAR File in Maven

1. Overview Web application resources or web application archives are commonly called WAR files. A WAR file is used to deploy a Java EE web application in an application server. Inside a WAR file, all...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 406

1. Spring and Java >> Gavin Bierman explains pattern matching for switch, a Java 17 preview [blogs.oracle.com] An interview about what pattern matching is, how it affects the way we code, and...

View Article

Image may be NSFW.
Clik here to view.

Serverless Architecture with Knative

1. Introduction In this tutorial, we'll explore how to deploy a serverless workload on the Kubernetes platform. We'll use Knative as the framework to perform this task. In the process, we'll also learn...

View Article

Image may be NSFW.
Clik here to view.

Spring Boot vs Quarkus

1. Overview In this article, we'll make a simple comparison between two well-known Java frameworks, Spring Boot and Quarkus. At the end of it, we'll have a better understanding of the differences and...

View Article


Image may be NSFW.
Clik here to view.

Guide to Using ModelMapper

1. Introduction In a previous tutorial, we've seen how to map lists with ModelMapper. In this tutorial, we're going to show how to map our data between differently structured objects in ModelMapper....

View Article


Image may be NSFW.
Clik here to view.

Cassandra Frozen Keyword

1. Overview In this tutorial, we'll be talking about the frozen keyword in the Apache Cassandra database. First, we'll show how to declare the frozen collections or user-defined types (UDTs). Next,...

View Article

Image may be NSFW.
Clik here to view.

Trusting All Certificates in OkHttp

1. Overview In this tutorial, we'll see how to create and configure an OkHttpClient to trust all certificates. Take a look at our articles about OkHttp for more specifics on the library. 2. Maven...

View Article

Image may be NSFW.
Clik here to view.

Looking for a Java/Spring Technical Editor for Baeldung

This is not the typical code-focused style of article I usually publish here on Baeldung. Jumping right into it – the site is growing, more and more developers are applying to become authors, and the...

View Article

Image may be NSFW.
Clik here to view.

Update the Value Associated With a Key in a HashMap

1. Overview This tutorial will go through the different approaches for updating the value associated with a given key in a HashMap. First, we'll look at some common solutions using only those features...

View Article


Image may be NSFW.
Clik here to view.

Get a Field’s Annotations Using Reflection

1. Overview In this tutorial, we'll learn how to get a field's annotations. Additionally, we'll explain how the retention meta-annotation works. Afterward, we'll show the difference between two methods...

View Article

Image may be NSFW.
Clik here to view.

Using Fail Assertion in JUnit

1. Overview In this tutorial, we'll explore how to use JUnit fail assertion for common testing scenarios. We'll also see fail() method differences between JUnit 4 and JUnit 5. 2. Using fail Assertion...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 407

1. Spring and Java >> Faster Maven builds in Docker [blog.frankel.ch] Faster Maven builds are always good. Especially when you have a repo that takes an hour and a half to build >> Fetching...

View Article

Image may be NSFW.
Clik here to view.

Reactive Streams API with Ratpack

1. Introduction Ratpack is a framework built on top of the Netty engine, which allows us to quickly build HTTP applications. We’ve already covered its basic usage in previous articles. This time, we’ll...

View Article


Image may be NSFW.
Clik here to view.

Environment Variable Prefixes in Spring Boot 2.5

1. Overview This tutorial will discuss a feature added in Spring Boot 2.5 that enables the possibility to specify a prefix for system environment variables. This way, we can run multiple different...

View Article

Image may be NSFW.
Clik here to view.

Convert a Byte Array to a Numeric Representation in Java

1. Overview In this tutorial, we'll explore different approaches to convert a byte array to a numeric value (int, long, float, double) and vice versa. The byte is the basic unit of information in...

View Article

Image may be NSFW.
Clik here to view.

Remove an Entry from a Java HashMap

1. Overview In this article, we'll discuss different ways to remove an entry from a Java HashMap. 2. Introduction HashMap stores entries in (Key, Value) pairs with unique keys. Thus, one idea would be...

View Article
Browsing all 4535 articles
Browse latest View live


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