If I have 1000 objects and my requirement is to sort them
quickly, then which collection would you recommend and why?
Answer Posted / sanjay
The question is about collection and not about the algorithm - My answer is array or arrayList. arraylist is backed by an array so it will have identical performance to an array.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Why main() method is public, static and void in java ?
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
Explain about anonymous inner classes in java?
What is the symbol for line break?
What is lambda expression in java?
For class CFoo { }; what default methods will the compiler generate for you>?
What are extraneous variables examples?
Can an abstract class be a final class?
What is unicode with example?
Difference between character constant and string constant in java ?
Is an integer an object?
What languages are pass by reference?
What is string immutability?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
Can you extend singleton class?