Mastering Custom Sorting in Java: Comparator Made SimpleIf you’ve ever needed to sort a list of objects in Java say, a list of students by marks, names, or roll numbers you’ve likely bumped into Comparator. It’s one of the most powerful (and often underrated) tools in the Java Collections framework. Wha...May 17, 2025 · 2 min readsetter.hashnode.dev
Mastering the Sieve of Eratosthenes: Finding Closest Primes EfficientlyIntroduction While doing LeetCode's daily challenge today, I faced a problem that needed me to find the nearest pair of primes within a specific range efficiently. While doing so, I got to know about the Sieve of Eratosthenes, which is a fast algor...Mar 7, 2025 · 2 min readsetter.hashnode.dev
An Introduction to Java Multithreading ConceptsWhat is Multithreading? Multithreading is a technique in which multiple tasks run simultaneously within the same program. It allows efficient utilization of CPU by executing multiple threads independently. Example Think of a web browser , You can ope...Mar 1, 2025 · 2 min readsetter.hashnode.dev
Logging in JavaLogging is an essential part of software development that helps track important events, debug errors, and analyze application behavior. Instead of relying on System.out.println(), which is not efficient for large-scale applications, developers use lo...Feb 21, 2025 · 1 min readsetter.hashnode.dev
Demonstration of passing object reference by value as parameter in java methods .ATTEMPTING TO REASSIGN OBJECT . If you reassign an object reference inside java method it do not affect the original state of object outside that method .Below is an demonstration ,that shows java passes object reference by value . public class n { ...Jul 4, 2024 · 2 min readsetter.hashnode.dev