[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Technical Discussion :: Java

16 / 66

What is the Comparable and Comparator interface ?

Answer:

Java Comparable interface is used to order the objects of user-defined classes. It has compareTo(object) method and is available in jva.lang package.



Java Comparator interface is available in java.util package. It has two methods compare(Object obj1, Object obj2) and equals(Object element).

Asked In ::

Post Your Answer Here:


Rate This: +1 -0      +
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.