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
Which sorting is used in arrays sort in java?
Write java program to reverse string without using api?
Is empty list java?
Can you access the private method from outside the class?
What does i ++ mean in Java?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
Explain the difference between map and flatmap stream operation?
What is gc()?
What is a method declaration?
How concurrent hashmap works?
Does constructor be static?
Can we create object of inner class in java?
Can we catch more than one exception in a single catch block?
What is update method called?
What is difference between arraylist and list in java?