- Array Parallel Sort
1. What Is Parallel Sort? Imagine you have a massive pile of unsorted exam papers — thousands of them. You could sit down alone and sort them one by one. Or, you could divide the pile among several teaching assistants, have each sort their portion, and then merge the sorted piles back together.…
- Date Time API
1. Problems with the Old Date API Before Java 8, working with dates and times in Java was painful. The original java.util.Date and java.util.Calendar classes were introduced in JDK 1.0 and 1.1 respectively, and they were riddled with design flaws that caused bugs in virtually every codebase. What…
- Optional
1. The Billion Dollar Mistake In 2009, Sir Tony Hoare — the computer scientist who invented the null reference in 1965 for the ALGOL W language — delivered a now-famous keynote titled “Null References: The Billion Dollar Mistake.” He said: “I call it my billion-dollar mistake. It was the invention…
- StringJoiner
1. What is StringJoiner? StringJoiner is a utility class introduced in Java 8 that builds a sequence of characters separated by a delimiter, with optional prefix and suffix. It lives in java.util and solves a problem every Java developer has faced: how do you join a list of strings with commas (or…
- Collectors class
1. What is the Collectors Class? When you use the Stream API, the collect() terminal operation is how you transform a stream back into a concrete data structure — a List, a Set, a Map, a String, or even a custom container. But collect() does not know how to build these structures on its own. […]