which one is more efficient
int x;
1. if(x==null)
2.if(null==x)
state which one either 1 or 2?
Answers were Sorted based on User's Feedback
Answer / person
neither... they wouldn't compile without explicit Integer cast.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / santosh
if the value is null how can we compare it always (x==null)correct
| Is This Answer Correct ? | 2 Yes | 4 No |
What is nextint java?
What is the base class of all exception classes?
how does the run() method in runnable work? : Java thread
How do you sort a list in java?
Difference difference paint() and paintcomponent()?
Why do we need hashmap in java?
Can a final variable be initialized in constructor?
Does substring start with 0?
Explain some best practices you would apply while using collection in java?
How do you compare two objects?
What does compareto () do in java?
Explain static nested classes ?