Q2.
What happens on trying to compile and run the following code?
1.public class EqualsTest{
2.public static void main(
String args[] ){
3.float A = 1.0F / 3.0F ;
4.if( ( A * 3.0F) == 1.0F )
5.System.out.println( "Equal" );
6.else
7.System.out.println( "Not Equal" );
8. }
9. }
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 in line 4.
The answer mentioned is (a).Should'nt it be (b) ???