Vidyalelo
Java Programming · Q22

Miscellaneous Java

Programming · Java Programming · question 22

Q22

In Java, what is the purpose of the `compareTo` method in the Comparable interface?

A.
To execute SQL queries
B.
To compare two objects for order
Answer
C.
To create JavaBeans
D.
None of These

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board