---
title: "Discussion on \"Comparable Part-2\" | Hashnode"
description: "Discussion on \"Comparable Part-2\". Earlier, 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.\n\nIf you haven’t read it yet, you can check it out here:👉 Sorting C..."
url: "https://hashnode.com/posts/comparable-part-2/695514d7d0fddfb882e2429b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Comparable Part-2](https://javaeduacademy.hashnode.dev/comparable-part-2?utm_source=hashnode&utm_medium=feed)

Earlier, 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.dev  
Read the article

-   [#dsending](https://hashnode.com/tag/dsending)
-   [#dsending-order](https://hashnode.com/tag/dsending-order)
-   [#comparable](https://hashnode.com/tag/comparable)
-   [#java-comparable](https://hashnode.com/tag/java-comparable)
-   [#string-compareto](https://hashnode.com/tag/string-compareto)
-   [#compare-to](https://hashnode.com/tag/compare-to)

## Written by

[chanbasha](https://hashnode.com/@javaeduacademy)

@javaeduacademy

  
[View profile](https://hashnode.com/@javaeduacademy)

Code Smarter , Grow Faster

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
