Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Diff between Comparator and Comparable?

Answer Posted / rajesh

Comparable interface uses Object's compareTo() to compare
the objects. We have to override the compareTo() method in
order to sort.

Where as Comparator, checks for compare() method. You can
sort based on particular property of the object.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

define the terminology association.

1153


What is the purpose class.forname method?

1011


What does a method signature consist of?

1050


What is the difference between processes and threads?

1113


Why does java not allow multiple public classes in a java file ?

4663


Write a program to check string is palindrome without using loop?

1092


What are the main differences between the java platform and other platforms?

1109


Can we make main() thread as daemon?

1153


difference between byte stream class and character stream class?

4603


What are passing parameters?

1143


Which is faster set or list in java?

1077


Can you change array size in java?

1013


What is object class in java?

985


Is java written in c?

1019


what is the constructor and how many types of constructors are used in java?

1037