Command-Line Arguments in Java 1. Introduction It’s quite common to run applications from the command-line using arguments. Especially on the server-side. Usually, we don’t want the application to do the same thing on every run: we want to configure it’s behavior some way. In this short tutorial, we’ll explore how… Continue Reading java-command-line-arguments

Check If Two Rectangles Overlap In Java 1. Overview In this quick tutorial, we’ll learn to solve an algorithmic problem of checking whether the two given rectangles overlap. We’ll start by looking at the problem definition and then progressively build up a solution. Finally, we’ll implement it in Java. 2.… Continue Reading java-check-if-two-rectangles-overlap

How to Separate Double into Integer and Decimal Parts Java 1. Overview In this tutorial, we’ll explore various methods to separate integer and decimal parts of floating-point types in Java, namely float and double. 2. Issues with Floating-Points Types Let’s start by looking at a simple fraction, and a naive way of… Continue Reading java-separate-double-into-integer-decimal-parts

Fail-Safe Iterator vs Fail-Fast Iterator 1. Introduction In this article, we’ll introduce the concept of Fail-Fast and Fail-Safe Iterators. Fail-Fast systems abort operation as-fast-as-possible exposing failures immediately and stopping the whole operation. Whereas, Fail-Safe systems don’t abort an operation in the case of a failure. Such systems try to avoid… Continue Reading java-fail-safe-vs-fail-fast-iterator