Shared Tutorials

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Basic Detail

How to use Comparator and Comparable in Java With exam

Comparators and comparable in Java are two of fundamental interface of Java API which is very important to understand to implement sorting in Java.
http://javarevisited.blogspot.com/2011/06/comparator-and-comparable-in-java.html

Description:

What is Difference between Comparator and Comparable in Java question was asked in a Test paper for one of big Investment bank first round of interview. It was not that straight forward but it was related to how you will sort Employee object based on his EmployeeID and his name and that involves the use of both Comparable and Comparator in Java. Comparators and comparable in Java are two of fundamental interface of Java API which is very important to understand to implement sorting in Java.

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 36.24%  54
 Two starsTwo star  Vote LeftVote MiddleVote Right 10.07%  15
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 11.41%  17
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 10.74%  16
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 31.54%  47

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.





Advertisements