This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

No

 
Dhananjay Ramakrishnappa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
Therz no difference in terms of effieciency.

In the first case a is compared with null

In the second case null is compared with a.

Its very much similar to if(a==a){}
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Report post to moderator
I thing this post belongs in the Performance forum in this thread
 
    Bookmark Topic Watch Topic
  • New Topic