explain this method in java.util

Posted on 2006-04-29
Last Modified: 2010-03-31

hello there,

Can anybody explain this method in java.util and the comparator c

sort(List list, Comparator c)

i understand it is used to sorts the specified list

this bit i dont understand "according to the order induced by the specified comparator"

Question by:zolf
    LVL 14

    Expert Comment

    this link will teach you how to sort collections using comparable and comparator
    LVL 14

    Assisted Solution

    LVL 24

    Accepted Solution

    Every time the sorting method wants to compare anything it calls the Comparator's compare().


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    method argument as final 1 54
    classnotfoundexception 3 29
    changeXy challenge 13 41
    HashMap Vs TreeMap 12 34
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now