I just found out that I can compare null
with an Object
like this,
if(null != Object)
Rather than comparing Object
with null
, like
Object != null
What may go wrong if use the former approach?
Is that legal? If not then why does compiler accept it?