difference between null != something and something != null

前端 未结 7 1303
予麋鹿
予麋鹿 2021-01-22 11:41

Is there a difference between null != something and something != null in Java. And if there is a difference then which one should I use and why??

7条回答
  •  后悔当初
    2021-01-22 12:09

    There is no difference, but some people use it for ease of readability in their code.

提交回复
热议问题