• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between null!=obj and obj!=null  RSS feed

 
Hari babu
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there any difference between these two checks for null
1. if(null!=myObject){
}

2. if(myObject!=null){
}
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This obviously doesn't belong to "Advanced Java". The answer is there is no difference whatsoever.
Eugene.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See previous discussion here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!