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

Wrapping vs Rethrowing Exceptions in Java

1. Overview The throw keyword in Java is used to explicitly throw either a custom-made exception or in-built exception. But sometimes in the catch block, we need to throw the same exception again. This...

View Article


Guide to the AuthenticationManagerResolver in Spring Security

1. Introduction In this tutorial, we introduce AuthenticationManagerResolver and then show how to use it for Basic and OAuth2 authentication flows. 2. What is the AuthenticationManager? Simply put, the...

View Article


Image may be NSFW.
Clik here to view.

AWS S3 with Java – Reactive Support

1. Introduction AWS offers many services through its many APIs which we can access from Java using their official SDK. Until recently though, this SDK didn’t offer support for reactive operations and...

View Article

A Quick Guide to Post Requests with OkHttp

1. Introduction We cover the basics of the OkHttp client in our Guide to OkHttp. In this short tutorial, we'll look specifically at different types of POST requests for version 3.x of the client. 2....

View Article

Java Weekly, Issue 312

1. Spring and Java >> The Future of Spring Cloud's Hystrix Project [infoq.com] A good overview of Resilience4j — the heir-apparent to Netflix Hystrix, which is in maintenance mode. >>...

View Article


Image may be NSFW.
Clik here to view.

Guide to WebRTC

1. Overview When two browsers need to communicate, they typically need a server in between to coordinate the communication, passing messages between them. But having a server in the middle results in a...

View Article

Deny Access on Missing @PreAuthorize to Spring Controller Methods

1. Introduction In our tutorial on Spring method security, we saw how we can use the @PreAuthorize and @PostAuthorize annotations. In this tutorial, we'll see how to deny access to methods that lack...

View Article

Pre-compile Regex Patterns Into Pattern Objects

1. Overview In this tutorial, we'll see the benefits of pre-compile a regex pattern and the new methods introduced in Java 8 and 11. This will not be a regex how-to, but we have an excellent Guide To...

View Article


Get Substring from String in Java

1. Overview In this quick tutorial, we'll focus on the substring functionality of Strings in Java. We'll mostly use the methods from the String class and few from Apache Commons' StringUtils class. In...

View Article


Java Scanner

1. Overview In this quick tutorial, we'll illustrate how to use the Java Scanner class – to read input, find and skip patterns with different delimiters. 2. Scan a File First – let's see how to read a...

View Article

Quick Guide to Java Stack

1. Overview In this quick article, we'll introduce the java.util.Stack class and start looking at how we can make use of it. The Stack is a generic data structure that represents a LIFO (last in, first...

View Article

Image may be NSFW.
Clik here to view.

Introduction to Ninja Framework

1. Overview Nowadays, there are many JEE based frameworks like Spring, Play, and Grails available for web application development. We may have our reasons to choose one of them over the others....

View Article

Image may be NSFW.
Clik here to view.

Median of Stream of Integers using Heap

1. Overview In this tutorial, we'll learn how to compute the median of a stream of integers. We'll proceed by stating the problem with examples, then analyze the problem, and finally implement several...

View Article


How to Set the JVM Time Zone

1. Overview The users of our applications can be demanding when it comes to timestamps. They expect our applications to detect their time zones automatically, and display timestamps in the correct time...

View Article

Using the Not Operator in If Conditions in Java

1. Introduction In Java's if-else statements we can take a certain action when an expression is true, and an alternative when it is false. In this tutorial, we'll learn about how to reverse the logic...

View Article


Bitwise & vs Logical && Operators

1. Introduction In Java, we've got two ways to say “AND”. But which to use? In this tutorial, we'll look at the differences between & and &&. And, we'll learn about bitwise operations and...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 313

Last Java Weekly of 2019 – let's jump right in here 1. Spring and Java >> Java 14 Is in Feature-Freeze and Release Rampdown [infoq.com] Now that the release process has begun, learn which JEPs...

View Article


Image may be NSFW.
Clik here to view.

Range Search Algorithm in Java

1. Overview In this tutorial, we'll explore the concept of searching for neighbors in a two-dimensional space. Then, we'll walk through its implementation in Java. 2. One-Dimensional Search vs...

View Article

Image may be NSFW.
Clik here to view.

Kruskal’s Algorithm for Spanning Trees

1. Overview In a previous article, we introduced Prim's algorithm to find the minimum spanning trees. In this article, we'll use another approach, Kruskal’s algorithm, to solve the minimum and maximum...

View Article

Image may be NSFW.
Clik here to view.

Sending Emails with Logback

1. Overview Logback is one of the most popular logging frameworks for Java-based applications. It has built-in support for advanced filtering, archival and removal of old log files, and sending log...

View Article
Browsing all 3605 articles
Browse latest View live


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