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
What is the use of 'super' keyword inside a constructor?
What is the benefit of inner / nested classes ?
What does jenkins do?
What does null mean in java?
What is hashset in java?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What two classes are used to read data only?
What is a java developer salary?
In how many ways we can do exception handling in java?
Does variable declaration allocate memory?
How do you sort a string in alphabetical order in java?
What is string value?
Can an interface have a constructor?
What are the escape sequences in java?
What is an abstract class and what is it’s purpose?