---
title: "Discussion on \"Java Comparator Interface\" | Hashnode"
description: "Discussion on \"Java Comparator Interface\". The Comparator interface gives us the liberty to simultaneously use more than one common attributes to sort objects created from a class. This is why it is different from Comparable interface. It belongs to the java.util package. To use the Comparato..."
url: "https://hashnode.com/posts/java-comparator-interface/6155d68628ed304eb1d7f90c"
---

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

Discussion

# [Java Comparator Interface](https://mastertbal.hashnode.dev/java-comparator-interface?utm_source=hashnode&utm_medium=feed)

The Comparator interface gives us the liberty to simultaneously use more than one common attributes to sort objects created from a class. This is why it is different from Comparable interface. It belongs to the java.util package. To use the Comparato...

Sep 30, 2021 · 4 min read · mastertbal.hashnode.dev  
Updated Aug 9, 2024  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#hashnode](https://hashnode.com/tag/hashnode)
-   [#hashnodebootcamp](https://hashnode.com/tag/hashnodebootcamp)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programing](https://hashnode.com/tag/programing)

## Written by

[MASTER-TBAL Oluwatobi](https://hashnode.com/@TBAL)

@TBAL

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

Budding software developer | Techical writer

## Responses 2

Markdown supported · ⌘↵ to post

[Piyush kumar pandey](https://hashnode.com/@Piyush118)

[Feb 18, 2022](https://hashnode.com/posts/java-comparator-interface/6155d68628ed304eb1d7f90c/comment/620f4033d589905b41291b8b)

very nice article. love this.

[MASTER-TBAL Oluwatobi](https://hashnode.com/@TBAL)

[Jan 14, 2022](https://hashnode.com/posts/java-comparator-interface/6155d68628ed304eb1d7f90c/comment/61e11da2d546507ab03421c2)

Thank you very much for the likes! I really appreciate them!
