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 |
I have a Person object with 5 variables and I want to store them in a file called Person.txt. What should I do?
What are the different types of constructor?
Why bytecode is called bytecode?
Explain listiterator and methods in listiterator?
List primitive java types?
What is flag in java?
How to convert String into primitive datatype.
What will happen if we write code like: try{}catch(exception e)catch(IOException i)
explain about casting of objects?
When will you define a method as static?
Why java does not supports multiple inheritance?
Can we compare two strings in java?