OiO.lk Blog java Is there a difference between null does not equal value vs value does not equal null in Java?
java

Is there a difference between null does not equal value vs value does not equal null in Java?


Is there a difference in logic between the two variations below? If so, is there a recommended option?

if (foo != null) {
...
}

vs

if (null != foo) {
...
}



You need to sign in to view this answers

Exit mobile version