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

Image may be NSFW.
Clik here to view.

Role-Based Access Control in Quarkus

1. Overview In this tutorial, we’ll discuss Role-Based Access Control (RBAC) and how we can implement this functionality using Quarkus. RBAC is a well-known mechanism for implementing a complex...

View Article


Image may be NSFW.
Clik here to view.

Continue the Test Even After Assertion Failure in TestNG

1. Overview TestNG is a popular Java testing framework that’s an alternative to JUnit. While both frameworks offer their own paradigms, they both include the idea of assertions: logical statements that...

View Article


Image may be NSFW.
Clik here to view.

Get 2’s Complement of a Number in Java

1. Introduction Two’s complement is a fundamental concept in computer science, particularly when dealing with signed binary numbers. It enables the representation of both positive and negative integers...

View Article

Image may be NSFW.
Clik here to view.

Create HashMap with Character Count of a String in Java

1. Introduction Handling character counts within a string is common in various programming scenarios. One efficient approach is to utilize a HashMap to store the frequency of each character in the...

View Article

Image may be NSFW.
Clik here to view.

Setting Default TimeZone in Spring Boot Application

1. Overview Sometimes, we want to be able to specify the TimeZone used by an application. For a service running globally, this could mean that all servers are posting events using the same TimeZone, no...

View Article


Image may be NSFW.
Clik here to view.

Get Nextval From Sequence With Spring JPA

1. Introduction Sequences are number generators for unique IDs to avoid duplicate entries in a database. Spring JPA offers ways to work with sequences automatically for most situations. However, there...

View Article

Image may be NSFW.
Clik here to view.

Intro to Apache Commons Configuration Project

1. Overview At deployment time we may need to provide some configuration to the application. This can be from multiple external sources. Apache Commons Configuration provides a unified approach to...

View Article

Image may be NSFW.
Clik here to view.

Resolving Security Exception: java.security.UnrecoverableKeyException: Cannot...

1. Introduction In this tutorial, we’ll examine how to deal with java.security.UnrecoverableKeyException. We’ll also explore the details of what this exception actually means and what causes it....

View Article


Image may be NSFW.
Clik here to view.

Spring WebClient exchange() vs retrieve()

1. Overview WebClient is an interface that simplifies the process of performing HTTP requests. Unlike RestTemplate, it’s a reactive and non-blocking client that can consume and manipulate HTTP...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 540

1. Spring and Java >> The best way to use the JPA OneToOne optional attribute [vladmihalcea.com] Avoiding n+1 query issues by taking advantage of attributes of OneToOne in JPA >> Spring AI:...

View Article

Image may be NSFW.
Clik here to view.

Convert From int to short in Java

1. Overview When we work with Java, we often encounter scenarios where we need to convert data types to suit specific requirements. One common conversion is from int to short. In this tutorial, we’ll...

View Article

Image may be NSFW.
Clik here to view.

Compare the Numbers of Different Types

1. Overview Sometimes, we must compare the numbers, ignoring their classes or types. This is especially helpful if the format isn’t uniform and the numbers might be used in different contexts. In this...

View Article

Image may be NSFW.
Clik here to view.

assertEquals() vs. assertSame() in JUnit

1. Overview JUnit is a popular testing framework. As a part of its API, it provides a convenient way to check and compare objects. However, the difference between the two methods, assertEquals() and...

View Article


Image may be NSFW.
Clik here to view.

Print Distinct Characters of a String in Java

1. Introduction In Java programming, printing distinct characters from a string is a fundamental task often required in text processing and analysis. In this tutorial, we’ll explore various approaches...

View Article

Image may be NSFW.
Clik here to view.

How to Use Pair With Java PriorityQueue

1. Overview The PriorityQueue is one of the most powerful data structures. It’s uncommon in enterprise applications, but we often use it for coding challenges and algorithm implementations. In this...

View Article


Image may be NSFW.
Clik here to view.

Converting Float ArrayList to Primitive Array in Java

1. Overview Sequences of data are integral to any project and any programming language. In Java, there are two ways to represent a sequence of elements: Collections and arrays. In this tutorial, we’ll...

View Article

Image may be NSFW.
Clik here to view.

Handling Nulls in ArrayList.addAll()

1. Overview Working comfortably with Collection API is one of the most crucial skills of a Java developer. In this tutorial, we’ll concentrate on the ArrayList and its addAll() method. While addAll()...

View Article


Image may be NSFW.
Clik here to view.

Authenticate Using Social Login in Spring Authorization Server

1. Introduction In this tutorial, we’ll demonstrate how to setup the back end of a web application that uses Spring’s social login feature. We’ll use Spring Boot and the OAuth2.0 dependency. We’ll also...

View Article

Image may be NSFW.
Clik here to view.

Remove All Characters Before a Specific Character in Java

1. Introduction When working with strings in Java, we may encounter scenarios where we need to remove all characters before a particular delimiter or character. Fortunately, we can accomplish this task...

View Article

Image may be NSFW.
Clik here to view.

Finding The Index of the Smallest Element in an Array

1. Overview Operations on arrays are essential, and we might need them in any application. Sometimes, they’re hidden behind more convenient interfaces like Collections API. However, this is the basic...

View Article
Browsing all 4535 articles
Browse latest View live


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