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 |
Can we declare a class as abstract without having any abstract method?
What is constructor and virtual function? Can we call a virtual function in a constructor?
How do you sing an Applet ?
What one should take care of, while serializing the object?
What is private public protected in java?
What is the syntax and characteristics of a lambda expression? Explain
Can u overload main()method.Give with example.
6 Answers IBM, Schimatic Technologies,
How do you do math powers in java?
What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }
How do I get the | symbol on my keyboard?
describe method overloading
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.