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

Image may be NSFW.
Clik here to view.

Check If a Directory Is Empty in Java

1. Overview In this quick tutorial, we're going to get familiar with a few ways to find out if a directory is empty or not. 2. Using Files.newDirectoryStream As of Java 7, the Files.newDirectoryStream...

View Article


Image may be NSFW.
Clik here to view.

Java Weekly, Issue 343

1. Spring and Java >> Biased locking a goner, but better things Loom ahead [javaspecialists.eu] Ready to say farewell to Biased Locking in Java 15? A very detailed take on the effect of Biased...

View Article


Image may be NSFW.
Clik here to view.

Performance Effects of Exceptions in Java

1. Overview In Java, exceptions are generally considered expensive and shouldn't be used for flow control. This tutorial will prove that this perception is correct and pinpoint what causes the...

View Article

Image may be NSFW.
Clik here to view.

Converting List to Map With a Custom Supplier

1. Overview In this tutorial, we're going to convert a List<E> into a Map<K, List<E>>. We'll achieve this with Java's Stream API and the Supplier functional interface. 2. Supplier in...

View Article

Image may be NSFW.
Clik here to view.

Creating Docker Images with Spring Boot

1. Introduction As more organizations move towards containers and virtual servers, Docker is becoming a more significant part of software development workflows. To that end, one of the great new...

View Article


Image may be NSFW.
Clik here to view.

Liskov Substitution Principle in Java

1. Overview The SOLID design principles were introduced by Robert C. Martin in his 2000 paper, Design Principles and Design Patterns. SOLID design principles help us create more maintainable,...

View Article

Image may be NSFW.
Clik here to view.

Jess Rule Engine and JSR 94

1. Overview Using a rule engine is a great way to separate the business logic from our boilerplate code and protecting our application code from business changes. In a previous article on Java Rule...

View Article

Image may be NSFW.
Clik here to view.

Command-Line Tools to Find the Java Heap Size

1. Overview In this quick tutorial, we're going to get familiar with a few different ways to get the heap size of a running Java application. 2. jcmd To find the heap and metaspace related info of a...

View Article


Image may be NSFW.
Clik here to view.

The Difference Between Cron Syntax in Linux and Spring

1. Overview Cron expressions enable us to schedule tasks to run periodically at a specific date and time. After its introduction in Unix, other Unix-based operating systems and software libraries...

View Article


Image may be NSFW.
Clik here to view.

A Guide to BitSet in Java

1. Overview In this tutorial, we're going to see how we can use BitSets to represent a vector of bits. First, we'll start with the rationale behind not using the boolean[]. Then after getting familiar...

View Article

Image may be NSFW.
Clik here to view.

Java Weekly, Issue 344

1. Spring and Java >> Finalizing Records and Pattern Matching in Java 16 [mail.openjdk.java.net] Exciting news! There are plans to roll out the final version of Pattern Matching for instanceof...

View Article

Image may be NSFW.
Clik here to view.

Guide to SDKMAN!

1. Overview With the new release cycle of Java, developers might need to manage parallel versions and different builds of Software Development Kits (SDK) in their environment. So setting the PATH...

View Article

Image may be NSFW.
Clik here to view.

Using Mockito ArgumentCaptor

1. Overview In this tutorial, we'll cover a common use case of using Mockito ArgumentCaptor in our unit tests. Alternatively, for other Mockito.verify use cases, see our Mockito Verify Cookbook. 2....

View Article


Image may be NSFW.
Clik here to view.

Setting Formulas in Excel with Apache POI

1. Overview In this quick tutorial, we're going to talk about how we can set formulas in a Microsoft Excel spreadsheet using Apache POI through a simple example. 2. Apache POI Apache POI is a popular...

View Article

Image may be NSFW.
Clik here to view.

System.console() vs. System.out

1. Introduction In this tutorial, we'll explore the differences between System.console() and System.out. 2. System.console() Let's first create a program to retrieve the Console object: void...

View Article


Image may be NSFW.
Clik here to view.

Preserving Line Breaks When Using Jsoup

1. Overview In this tutorial, we'll look briefly at the different ways of preserving line breaks when using Jsoup to parse HTML to plain text. We will cover how to preserve line breaks associated with...

View Article

Image may be NSFW.
Clik here to view.

Taking Screenshots Using Java

1. Introduction In this tutorial, we'll take a look at a few different ways of taking a screenshot in Java. 2. Taking a Screenshot Using Robot In our first example, we're going to take a screenshot of...

View Article


Image may be NSFW.
Clik here to view.

Comparing Arrays in Java

1. Overview In this tutorial, we're going to have a look at different ways to compare arrays in Java. We'll cover conventional methods, and we'll also see some examples using lambda expressions. 2....

View Article

Image may be NSFW.
Clik here to view.

When are Static Variables Initialized in Java?

1. Introduction In this tutorial, we'll explore the static variable initialization process. The Java Virtual Machine (JVM) follows this process during class loading. 2. Initialization Process At a high...

View Article

Image may be NSFW.
Clik here to view.

How to Implement a CNN with Deeplearning4j

1. Overview In this tutorial, we'll build and train a convolutional neural network model using the Deeplearning4j library in Java. For further information on how to set up the library please refer to...

View Article
Browsing all 4535 articles
Browse latest View live


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