空差 [英] Null Difference
本文介绍了空差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
if(null==object)
和
if(object==null)
请充分利用上面的优点.
Please give the advantage for using the above.
推荐答案
如果您不小心键入 =
而不是 ==
:
The difference comes if you accidentally type =
instead of ==
:
if(null = object)
-编译器错误 if(object = null)
-错误!
if (null = object)
- Compiler error
if (object = null)
- Bug!
这篇关于空差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文