The way to compare with null is to use x == null and x != null . Moreover, x.field and x.method() throws NullPointerException if x == null .
確定! 回上一頁