BASIC / NOTES</>↗Basic05 Nov 2025
Java 25 introduces several advancements focusing on simplified and modernized entry points to write cleaner main methods for applications. Here’s an overview of how to leverage these improvements to write simplified entry points: Understanding Unnamed Classes and Instance Main Java 25 introduces new features that make defining the main entry point of an application more […]
BASIC / NOTES</>↗Basic05 Nov 2025
In Java 25, the introduction of classless main methods and unnamed classes significantly simplifies writing small programs, scripts, and experiments. Here’s how you can leverage these features effectively: Classless Main Methods This functionality is aimed at reducing boilerplate for small Java applications. You can now define a main method directly without wrapping it in a […]
BASIC / NOTES</>↗Basic04 Nov 2025
In Java 25, you can take advantage of the classless main method, allowing you to write short and simple programs without needing to wrap them in a class declaration. This feature is designed to make Java more approachable, especially for quick scripting or beginner-friendly coding introductions. How to Use Classless Main Methods Create a Java […]
UTIL PACKAGE / NOTES</>↗Util Package04 Nov 2025
The Map.forEach method in Java provides a concise and elegant way to iterate over all key-value pairs in a Map. This method accepts a lambda function (or method reference), which processes each entry in the map. Here’s how you can use Map.forEach for concise iteration: Syntax: map.forEach((key, value) -> { // Your logic here }); […]
JAVA 9 / NOTES</>↗Java 903 Nov 2025
In Java 9, the Collectors.filtering method was introduced to the Stream API as part of java.util.stream.Collectors. It allows you to apply a filter to elements of a stream before collecting them into a downstream collector (e.g., toList, toSet, etc.). This can be particularly useful when you want to filter elements as part of the data […]
STREAM API / NOTES</>↗Stream API03 Nov 2025
Using the Optional.stream() method with flatMap is a common scenario when you want to work with collections and operations involving Optional. The Optional.stream() method converts an Optional value into a Stream, which will either contain the single value (if the Optional is present) or be empty (if the Optional is empty). This is particularly useful […]