It may just be a style question, but I am reading a Java coding book (“Android Programming”), and the author all declares null first before the variable method, with a practice that I am not familiar with. For instance:
if (null == foo) { enter code here }
or
if (null != foo) { enter code here }
instead
if (foo == null) { enter code here }
I don’t see how order will matter semantically / syntactically, or am I wrong here? Actually just curious. Thanks.
source share