short_circuit_prevent_nullptr.mj 199 Bytes
Newer Older
uwgwb's avatar
uwgwb committed
1
2
3
4
5
6
7
8
9
10
11
class A {
    public boolean c;
    public static void main(String[] args) {
        boolean b = true;
        A a = null;
        if(b || a.c) {
            System.out.println(3);
        }
    }

}