which one is more efficient
int x;
1. if(x==null)
2.if(null==x)
state which one either 1 or 2?

Answer Posted / sudhanshu

1. if (x==null)
is the correct answer.

Is This Answer Correct ?    21 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is run time allocation?

575


What is data structure in java?

531


Can we convert list to set in java?

510


What are the differences between string and stringbuffer?

587


What is the difference between a break statement and a continue statement?

595






What carriage return means?

528


Why does java not allow multiple public classes in a java file ?

3438


Can you extend singleton class?

598


how would you implement a thread pool? : Java thread

501


Write code of any action class?

544


Write a program to check string is palindrome without using loop?

565


What is the SimpleTimeZone class?

1794


Why isn’t there operator overloading?

592


What is method reference?

515


What is Gang of four design patterns

592