Computer Science, asked by neerugarg40, 1 month ago

The Comparable interface contains which called?​

Answers

Answered by shivkumari81
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 CuteBunny21
22

Answer:

\huge\mathcal{\fcolorbox{aqua}{azure}{\red{❖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