Code: Select all
class LoopTest{
public static void main(String[] args) {
boolean flag = true;
if(flag == false){
System.out.println("1");
}else if(!flag&flag){//line 2
System.out.println("2");
}else if(!flag){
System.out.println("3");
}else System.out.println("4");}}
can you give me a reference or examples of which operator &&,& ?,||,^. gives what output, in book its quite confusing?