J
java_programmer
Hi all,
I have seen the following test for null written
if(null != myObject)
{
....
}
as opposed to
if(myObject != null)
{
...
}
I have been told that the first version is slightly optimised and more
performant but I can't work out why. Does anyone have any thoughts?
Thanks
I have seen the following test for null written
if(null != myObject)
{
....
}
as opposed to
if(myObject != null)
{
...
}
I have been told that the first version is slightly optimised and more
performant but I can't work out why. Does anyone have any thoughts?
Thanks