compareTo() methods compare the specified object to be double, if it is not then ClassCastException is thrown.
Previous Question Next Question
Your comments will be displayed only after manual approval.