Hi!
I try to compile the following code, and get a compile error
said:
Test.java:4: operator & cannot be applied to int,boolean
if ( i&j == 4 )
^
1 error
public class
Test {
public static void main(
String[] args){
int i = 4, j = 7;
if ( i&j == 4 )
System.out.println(" equal ");
else System.out.println(" not equal");
}
}
what is the compiler talking about?