G
gk
int a = 5;
System.out.println("Value is - " + ((a < 5) ? 9.9 : 9));
output: 9.0
where from 9.0 came from ? there is 9 but NOT 9.0
see, the condition a<5 is false.....so this should print 9
but output is 9.0
System.out.println("Value is - " + ((a < 5) ? 9.9 : 9));
output: 9.0
where from 9.0 came from ? there is 9 but NOT 9.0
see, the condition a<5 is false.....so this should print 9
but output is 9.0