1.

What is the output of this program?public class Result { public static void main(String args[]) { Double num0 = new Double(260.0062); Double num1 = new Double(260.0062123456); try { int p = num1.compareTo(num0); System.out.print(p); } catch(ClassCastException e) { System.out.print("Exception"); } } }

A. Exception
B. 0
C. 1
D. -1
E. None of these
Answer» D. -1


Discussion

No Comment Found

Related MCQs