Forums Register Login

Difference between null!=obj and obj!=null

+Pie Number of slices to send: Send
Hi,
Is there any difference between these two checks for null
1. if(null!=myObject){
}

2. if(myObject!=null){
}
+Pie Number of slices to send: Send
This obviously doesn't belong to "Advanced Java". The answer is there is no difference whatsoever.
Eugene.
+Pie Number of slices to send: Send
See previous discussion here.
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 652 times.
Similar Threads
Why does it take 2 requests to set session attribute?
Doubt about using 'null'
Problem with Updating Foreign key values
object creation
Using static
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:26:28.