Which of these exceptions is thrown by compareTo() method defined in double wrapper?
A. IOException
B. SystemException
C. CastException
D. ClassCastException
Answer:A
Which of these exceptions is thrown by compareTo() method defined in double wrapper?
A. IOException B. SystemException C. CastException D. ClassCastException
Explanation: compareTo() methods compare the specified object to be double, if it is not then ClassCastException is thrown.