When I run the following program in text pad (I have jdk1.1.7(IBM)on NT) I gets O/P as 10 & when the same program is run with VAJ3.0 on NT I gets O/P as 10.0
Can any one explain the mystery ?
If I have following choices then what I should I pick for such type of questions ?
a) Compiler error
b) Runtime exception
c) 10
d) 6.0
e) 10.0
class X {
public static void main(
String[] a) {
System.out.println(9 > 8?10:6.0);
}
}
Cheers
Ashish