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
What do you mean by stack?
Can we start a thread twice in java?
Can we make main() thread as daemon?
What is the difference between assignment and initialization?
Can a class declared as private be accessed outside it’s package?
Explain where variables are created in memory?
Difference between this() and super() in java ?
What is a parameter in simple terms?
Why should we use singleton pattern instead of static class?
What is the differences between heap and stack memory in java? Explain
What is a short in java?
What is the purpose of format function?
How to provide security in java
Explain the difference between call by refrence and call by value?
is it possible to instantiate the math class?