Examveda

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

C. To create JavaBeans

D. None of These

Answer: Option B


This Question Belongs to Java Program >> Miscellaneous In Java

Join The Discussion

Related Questions on Miscellaneous in Java