No.
People sometimes write null == a for historical reasons, because it eliminates the possibility of typo errors in C. If you were to write:
if (a = NULL) {
in C, then this will execute the assignment operator a = NULL , with the result of the execution being the assigned value (i.e. NULL). Thus, instead of checking the value of a , you set it to NULL, and then essentially check if (NULL) , which is always false. It compiles, but it is almost certainly not what you want. And all this because of a small typo = vs == .
If you first set NULL , then if (NULL = a) is a compilation error, since you cannot assign a value to the constant that NULL represents.
There is no need for this in Java, since if (null) {... does not compile. (You can still have the same error in Java with boolean variables: if (someBooleanVar = someMethod()) . But this is a relatively rare pattern.)
This style is sometimes referred to as the " Yoda terms ," as it resembles the Yoda bizarre style in Star Wars.
source share