When testing whether an object is null, is null placed to the left or right of the comparison operator? Which is standard?

Viewed 28

When testing whether an object is null,which of the following is better and why?

  1. if (Object == null)

  2. if (null == Object)

0 Answers
Related