Sequences in Kotlin
1. Overview The Kotlin language introduces sequences as a way to work with collections. They are quite similar to Java Streams, however, they use different key concepts under-the-hood. In this...
View ArticleBalanced Brackets Algorithm in Java
1. Overview Balanced Brackets, also known as Balanced Parentheses, is a common programming problem. In this tutorial, we will validate whether the brackets in a given string are balanced or not. 2....
View ArticleGuide to Work Stealing in Java
1. Overview In this tutorial, we'll look at the concept of work stealing in Java. 2. What Is Work Stealing? Work stealing was introduced in Java with the aim of reducing contention in multi-threaded...
View ArticleCreating a LocalDate with Values in Java
1. Overview Creating a date in Java had been redefined with the advent of Java 8. Besides, the new Date & Time API from the java.time package can be used with ease relative to the old one from the...
View ArticleWorking with Lazy Element Collections in JPA
1. Overview The JPA specification provides two different fetch strategies: eager and lazy. While the lazy approach helps to avoid unnecessarily loading data that we don't need, we sometimes need to...
View ArticleGenerating Barcodes and QR Codes in Java
1. Overview Barcodes are used to convey information visually. We'll most likely provide an appropriate barcode image in a web page, email, or a printable document. In this tutorial, we're going to look...
View ArticleGuide to @CurrentSecurityContext in Spring Security
1. Overview Spring Security handles receiving and parsing authentication credentials for us. In this short tutorial, we're going to look at how to get the SecurityContext information from a request,...
View ArticleParsing Command-Line Parameters with Airline
1. Introduction In this tutorial, we'll introduce Airline — an annotation-driven Java library for building Command-Line Interfaces (CLIs). 2. Scenario When building a command-line application, it's...
View ArticleGuide to the Cactoos Library
1. Introduction Cactoos is a library of object-oriented Java primitive types. In this tutorial, we'll take a look at some of the classes available as a part of this library. 2. Cactoos The Cactoos...
View ArticleMerge Cells in Excel Using Apache POI
1. Overview In this tutorial, we'll show how to merge cells in Excel with Apache POI. 2. Apache POI To begin with, we first need to add the poi dependency to our project pom.xml file:...
View Articlejava.net.UnknownHostException: Invalid Hostname for Server
1. Introduction In this tutorial, we'll learn the cause of UnknownHostException with an example. We'll also discuss possible ways of preventing and handling the exception. 2. When is the Exception...
View ArticleIntroduction to Dropwizard
1. Overview Dropwizard is an open-source Java framework used for the fast development of high-performance RESTful web services. It gathers some popular libraries to create the light-weight package. The...
View ArticleLooking for a Java Developer with Spring Security Experience (Remote) (Part...
Who? I'm looking for a Java developer with extensive Spring and Spring Security experience. Some experience with OAuth is a strong plus. On the non-technical side – a good level of command over the...
View ArticleJPA Entity Lifecycle Events
1. Introduction When working with JPA, there are several events that we can be notified of during an entity's lifecycle. In this tutorial, we'll discuss the JPA entity lifecycle events and how we can...
View ArticleFinal vs Effectively Final in Java
1. Introduction One of the most interesting features introduced in Java 8 is effectively final. It allows us to not write the final modifier for variables, fields, and parameters that are effectively...
View ArticleJava Weekly, Issue 318
1. Spring and Java >> Creating Docker images with Spring Boot 2.3.0.M1 [spring.io] A quick look at Spring Boot's upcoming support for buildpacks and layered jars — two new features that make it...
View ArticleDifference Between Java Matcher find() and matches()
1. Overview When working with regular expressions in Java, we typically want to search a character sequence for a given Pattern. To facilitate this, the Java Regular Expressions API provides the...
View ArticleHow to Create a Slack Plugin in Java
1. Introduction Slack is a popular chat system used by people and companies around the world. One of the things that makes it so popular is the ability to write our own custom plugins that can interact...
View ArticleSpring Cloud Gateway Routing Predicate Factories
1. Introduction In a previous article, we've covered what is the Spring Cloud Gateway and how to use the built-in predicates to implement basic routing rules. Sometimes, however, those built-in...
View ArticleImplement Health Checks in OpenShift
1. Overview In this tutorial, we're going to illustrate how to keep an application deployed within OpenShift healthy. 2. What's a Healthy Application? First, let's try to understand what it means to...
View Article