fork download
class Test
{
    private static boolean b(String label, boolean value) {
        System.out.println(label + ": " + value);
        return value;
    }
    public static void main(String[] args)
    {
        if (b("1", true) || (b("2", false) || b("3", true)) && b("4", false))
        {
            System.out.println("How does this condition becomes true.");
        }

        if (b("5", false) && (b("6", false) || b("7", true)) || b("8", true))
        {
            System.out.println("Same with this condition, why is it true.");
        }
    }
}
Success #stdin #stdout 0.1s 27824KB
stdin
Standard input is empty
stdout
1: true
How does this condition becomes true.
5: false
8: true
Same with this condition, why is it true.