Conditional Statements difference

后端 未结 7 1507
日久生厌
日久生厌 2020-12-20 16:24

Is there any difference between below two statements

if (null != obj)

and

if (obj != null)

If both treate

7条回答
  •  庸人自扰
    2020-12-20 16:48

    No, but the second way is more common and more readable (and more logical in my opinion)

提交回复
热议问题