The Comparable interface contains which called?
Answers
Answered by
1
Answer:
Java Comparable interface is used to order the objects of the user-defined class. This interface is found in java. lang package and contains only one method named Compare To (Object). It provides a single sorting sequence only, i.e., you can sort the elements on the basis of single data member only.
Explanation:
Hope it helps you
Answered by
22
Answer:
Java Comparable interface is used to order the objects of the user-defined class. This interface is found in java. lang package and contains only one method named compareTo(Object). It provides a single sorting sequence only, i.e., you can sort the elements on the basis of single data member only
Similar questions