javaeduacademy.hashnode.devComparable Part-2Earlier, we learned how to sort the Car class by mileAge.In this article, we will focus on sorting cars by their color, helping us understand how Comparable works with String values. If you haven’t read it yet, you can check it out here:👉 Sorting C...Dec 31, 2025·3 min read
javaeduacademy.hashnode.devComparable Part-1Comparable : When we work with objects in Java, sometimes we want to sort them. For example : Sort employees by salary Sort students by marks Java does not know how to compare custom objects automatically.This is where Comparable comes in. What i...Dec 31, 2025·5 min read
javaeduacademy.hashnode.devBasic SortingSorting Basics in Java : A Simple Example Sorting is one of the fundamental concepts in programming. It helps us arrange data in a particular order, like ascending or descending, which makes searching and analysing data easier. In Java, sorting can b...Dec 30, 2025·4 min read