You can't accidently assign null
to obj
by typing obj = null
instead. However, that's a reminiscence from C times, in java, it is not possible, as the =
expression returns the right hand side of the assignment. As null
is not a boolean
, the compiler will complain.
I would try to explain it to my boss once, demonstrate it. If he still doesn't agree with you, just do it. It's a petty thing to fight about with your boss.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…