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

Image may be NSFW.
Clik here to view.

Guide to the Java Queue Interface

1. Introduction In this tutorial, we’ll be discussing Java’s Queue interface. First, we’ll take a peek at what a Queue does, and some of its core methods. Next, we’ll dive into a number of...

View Article


Image may be NSFW.
Clik here to view.

What is Thread-Safety and How to Achieve it?

1. Overview Java supports multithreading out of the box. This means that by running bytecode concurrently in separate worker threads the JVM is capable of improving the performance in applications....

View Article


Image may be NSFW.
Clik here to view.

Differences Between ZonedDateTime and OffsetDateTime

1. Overview ZonedDateTime and OffsetDateTime are pretty popular classes in the Java 8 DateTime API. Furthermore, both store an instant on the timeline up to a precision of nanoseconds. And, at first,...

View Article

Image may be NSFW.
Clik here to view.

Attaching Values to Java Enum

1. Introduction The Java enum type provides a language-supported way to create and use constant values. By defining a finite set of values, the enum is more type-safe than constant literal variables...

View Article

Image may be NSFW.
Clik here to view.

Intro to Derive4J

1. Introduction Derive4J is an annotation processor that enables various functional concepts in Java 8. In this tutorial, we’ll introduce Derive4J and the most important concepts enabled by the...

View Article


Image may be NSFW.
Clik here to view.

Java instanceof Operator

1. Introduction In this quick tutorial, we’ll learn about the instanceof operator in Java. 2. What is the instanceof Operator? instanceof is a binary operator used to test if an object is of a given...

View Article

Image may be NSFW.
Clik here to view.

Spring WebClient and OAuth2 Support

1. Overview Spring Security 5 provides OAuth2 support for Spring Webflux’s non-blocking WebClient class. In this tutorial, we’ll analyze different approaches to access secured resources using this...

View Article

Image may be NSFW.
Clik here to view.

Using Curl in Java

1. Overview In this tutorial, we’re going to look at how to use the curl tool inside a Java program. Curl is a networking tool used to transfer data between a server and the curl client using protocols...

View Article


Image may be NSFW.
Clik here to view.

Kafka Connect Example with MQTT and MongoDB

1. Overview In a previous article, we had a quick introduction to Kafka Connect, including the different types of connectors, basic features of Connect, as well as the REST API. In this tutorial, we’ll...

View Article


Image may be NSFW.
Clik here to view.

Enabling TLS v1.2 in Java 7

1. Overview When it comes to SSL connections, we should be using TLSv1.2. Indeed, it’s the default SSL protocol for Java 8. And while Java 7 supports TLSv1.2, the default is TLS v1.0, which is too weak...

View Article

Image may be NSFW.
Clik here to view.

Deserialize Immutable Objects with Jackson

1. Overview In this quick tutorial, we’ll show two different ways of deserializing immutable Java objects with the Jackson JSON processing library. 2. Why Do We Use Immutable Objects? An immutable...

View Article

Image may be NSFW.
Clik here to view.

How to Find JAVA_HOME

1. Introduction In this quick post, we’ll learn how to find JAVA_HOME on Windows, Mac, and Linux. As we all know, JAVA_HOME is an environment variable that we commonly use to locate java executables...

View Article

Image may be NSFW.
Clik here to view.

Converting Between LocalDate and SQL Date

1. Overview In this quick tutorial, we’ll learn how to convert between java.time.LocalDate and java.sql.Date. 2. Direct Conversion To convert from LocalDate to java.sql.Date,we can simply use the...

View Article


Image may be NSFW.
Clik here to view.

Map to String Conversion in Java

1. Overview In this tutorial, we’ll focus on conversion from a Map to a String and the other way around. First, we’ll see how to achieve these using core Java methods, and afterwards, we’ll use some...

View Article

Image may be NSFW.
Clik here to view.

Deprecated Classes in Spring

1. Introduction In this tutorial, we’re going to take a look at the deprecated classes in Spring and Spring Boot and explain what these have been replaced with. We’ll explore classes starting from...

View Article


Image may be NSFW.
Clik here to view.

Java 8 Streams peek() API

1. Introduction The Java Stream API introduces us to a powerful alternative for processing data. In this short tutorial, we’ll focus on peek(), an often misunderstood method. 2. Quick Example Let’s get...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 264

Here we go… 1. Spring and Java >> Practice Mock Interviews & Coding Problems with Pramp  If you’re looking to improve your interview game, definitely have a look at the Pramp mock interviews...

View Article


Image may be NSFW.
Clik here to view.

Spring PostConstruct and PreDestroy Annotations

1. Introduction Spring allows us to attach custom actions to bean creation and destruction. We can, for example, do it by implementing the InitializingBean and DisposableBean interfaces. In this short...

View Article

Image may be NSFW.
Clik here to view.

Setting up Lombok with Eclipse and Intellij

1. Overview Lombok is a library which facilitates many tedious tasks and reduces Java source code verbosity. Of course, we usually want to be able to use the library in an IDE, which requires...

View Article

Image may be NSFW.
Clik here to view.

How to Write to a CSV File in Java

1. Overview In this brief tutorial, we’re going to learn how to write to a CSV file using Java. CSV stands for Comma-Separated-Values and it’s a common format for doing a bulk data transfer between...

View Article
Browsing all 4535 articles
Browse latest View live


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