---
title: "Discussion on \"Comparable vs Comparator in Java\" | Hashnode"
description: "Discussion on \"Comparable vs Comparator in Java\". Comparable:\n\nThe Comparable interface is part of the Java language itself, and it is found in the java.lang package.\n\nWhen a class implements the Comparable interface, it means that instances of that class can be compared to each other for the purpos..."
url: "https://hashnode.com/posts/comparable-vs-comparator-in-java/651e57d09711390382149a23"
---

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

Discussion

# [Comparable vs Comparator in Java](https://deepakmishra.hashnode.dev/comparable-vs-comparator-in-java?utm_source=hashnode&utm_medium=feed)

Comparable: The Comparable interface is part of the Java language itself, and it is found in the java.lang package. When a class implements the Comparable interface, it means that instances of that class can be compared to each other for the purpos...

Oct 5, 2023 · 2 min read · deepakmishra.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#java-comparable](https://hashnode.com/tag/java-comparable)
-   [#java-comparator](https://hashnode.com/tag/java-comparator)

## Written by

[Deepak Mishra](https://hashnode.com/@deepakm)

@deepakm

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

I am a passionate learner, learning full stack development

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
