I wrote a simple if/else in my code which worked fine. Later I added another level of if under the first, and was baffled by its behavior. Here\'
if/else
if
public static void main(String[] args) { boolean a = true; boolean b = false; if (a && b) System.out.println("a=true, b=true"); else if (!a) System.out.println("a=false"); }