Sail E0 Webinar
Question

Which of these exceptions is thrown by compareTo() method defined in double 

wrapper?


Options:
A .  IOException
B .  SystemException
C .  CastException
D .  ClassCastException
Answer: Option D

compareTo() methods compare the specified object to be double, if it is not then 

ClassCastException is thrown.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers