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...2 min read·setter.hashnode.devMay 17, 2025
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...2 min read·setter.hashnode.devMar 7, 2025
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...2 min read·setter.hashnode.devMar 1, 2025
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...1 min read·setter.hashnode.devFeb 21, 2025
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 { ...2 min read·setter.hashnode.devJul 4, 2024