class Opr
{
static boolean method1(boolean b){
System.err.println("in 1");
return b;
}
static boolean method2(boolean b){
System.err.println("in 2");
return b;
}
static boolean method3(boolean b){
System.err.println("in 3");
return b;
}
public static void main(
String[] args)
{
boolean b = method1(true) && method2(false) & method3(true) ;
// System.err.println(b);
}
}
& has more priority than &&
so its has to print
in 2
in 3
in 1
but output is
---------- intepreter ----------
in 1
in 2
in 3
Output completed (0 sec consumed) - Normal Termination
How ??