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 a numeric literal?
what do you meant by Platform-Independent?
hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class
Which category the java thread do fall in?
Is special character in java?
Explain the difference between the public, private, final, protected, and default modifiers?
What are legal modifiers that we can use to declare an inner class?
How is tree Mirroring implemented?
Can you use abstract and final both with a method?
without using arthematic operation ,how can you write the logic for adding/substraction/multiplication?
7 Answers Tanla Solutions, Wipro,
What are reference variables in java?
What is sorting in java?