My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Can someone help me understand the following concepts from Java Collection API?

Honey Khandelwal's photo
Honey Khandelwal
·Jul 28, 2017
  • How does Collection.sort() work in Java?
  • What roles do Comparable and Comparator play in sorting?
  • How can I implement Collection.sort() in my program?

I am having tough time understanding above concepts. Please help me in understanding these concepts.If possible give examples.