Science, asked by wwwajithkumarr2193, 1 year ago

What is the Comparable interface in JAVA?

Answers

Answered by Anonymous
0
Two interfaces with same methodshaving same signature but different return types. Java does not support multiple inheritance but we can achieve effect of multiple inheritance using interfaces. In interfaces, a class can implement more than one interfacewhich can't be done through extends keyword.
Answered by IntrovertAngel
0

\huge{\color{t}{\textsf{\textbf {\underline{\underline{ Anѕwєr :  }}}}}}

  • Comparable , represents an object which can be compared to other objects. For instànce, numbers can be compared, strings can be compared using alphabetical comparison etc.
  • Several of the built-in classes in Java implements the Java Comparable interface.
Similar questions