Hi, the given code is from Bill Brodgen's exam cram mock
test, Q.no.28
a. The program compiles and prints "Not equal".
b. The program compiles and prints "Equal".
c. The compiler objects to line 3.
d. The compiler objects to using == with primitives
Correct answer given is a. But when I compiled and ran the above code, "Equal" was printed.
However, if I change the type of a to double, then "Not equal" is printed.
So I think b should be the right answer.
Could someone please explain what is the answer?
Thank you,
Prasanna.