The Dining Philosophers Problem in Java
1. Introduction The Dining Philosophers problem is one of the classic problems used to describe synchronization issues in a multi-threaded environment and illustrate techniques for solving them....
View ArticleJava 9 Optional API Additions
1. Overview In this article, we will be looking at the Java 9 additions to the Optional API. Beyond modularity, Java 9 is also adding three very useful methods for the Optional class. 2. The or()...
View ArticleJava Web Weekly, Issue 179
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> What archive format should you use, WAR or JAR? [frankel.ch] In the world of “java -jar”, it’s important to...
View ArticleSimple Single Sign On with Spring Security OAuth2
1. Overview In this tutorial, we’ll discuss how to implement SSO – Single Sign On – using Spring Security OAuth and Spring Boot. We’ll use three separate applications: An Authorization Server – which...
View ArticleThe Difference Between map() and flatMap()
1. Overview map() and flatMap() APIs stem from functional languages. In Java 8, you can find them in Optional, Stream and in CompletableFuture (although under slightly different name). Streams...
View ArticleIntro to Structurizr
1. Introduction This article is about Structurizr, a tool that provides a programmatic approach to architectural definitions and visualizations based on the C4 Model. Structurizr breaks with...
View ArticleJava 9 Reactive Streams
1. Overview In this article, we’ll be looking at the Java 9 Reactive Streams. Simply put, we’ll be able to use the Flow class, which encloses the primary building blocks for building reactive stream...
View ArticleHow to Round a Number to N Decimal Places in Java
1. Overview In this short article, we’re going to look at how to round a number to n decimal places in Java. 2. Decimal Numbers in Java Java provides two primitive types that can be used for storing...
View ArticleSpring Boot and Kotlin
1. Overview A big announcement was made back in January in the Spring ecosystem: Kotlin support is coming to Spring Framework 5. This means that Spring Boot 2.x will have first class support for...
View ArticleGuide to Akka Streams
1. Overview In this article, we will be looking at the akka-streams library that is built atop of the Akka actor framework, which adheres to the reactive streams manifesto. The Akka Streams API allows...
View ArticleMerging Streams in Java
1. Overview In this quick article, we explain different ways of merging Java Streams – which is not a very intuitive operation. 2. Using Plain Java The JDK 8 Stream class has some useful static...
View ArticleIntroduction to Netty
1. Introduction In this article, we’re going to take a look at Netty — an asynchronous event-driven network application framework. The main purpose of Netty is building high-performance protocol...
View ArticleSerenity BDD and Screenplay
1. Overview In this article, we’ll have a quick look at the Screenplay Pattern in Serenity BDD. We suggest you read the basics of Serenity BDD first before reading this one. Also, the article on...
View ArticleJava Web Weekly, Issue 180
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> Immutable Collections in Java 9 [javaspecialists.eu] Java 9 will feature a new way of defining truly immutable...
View ArticleTesting with JGoTesting
1. Overview JGoTesting is a JUnit-compatible testing framework inspired by Go’s testing package. In this article, we’ll explore the key features of the JGoTesting framework and implement examples to...
View ArticleHow to Get All Dates Between Two Dates?
1. Overview The new Time API introduced in Java 8 made it possible to process date and time without using external libraries. In this short tutorial, we will take a look at how getting all dates...
View ArticleJava EE Session Beans
1. Introduction Enterprise Session Beans can be broadly classified into: Stateless Session Beans Stateful Session Beans In this quick article, we are going to discuss these two main types of session...
View ArticleExample of Hill Climbing Algorithm
1. Overview In this tutorial, we’ll show the Hill-Climbing algorithm and its implementation. We’ll also look at its benefits and shortcomings. Before directly jumping into it, let’s discuss...
View ArticleBootstrap a Simple Application using Spring Boot
1. Overview Spring Boot is a significant addition to the Spring ecosystem. In this tutorial, we’ll discuss how to bootstrap a simple application using Spring Boot. This tutorial is a starting point...
View ArticleTop Spring Framework Interview Questions
1. Introduction In this article, we’re going to look at some of the most common Spring-related questions that might pop up during a job interview. 2. Spring Core Q1. What is Spring Framework? Spring...
View Article