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


Please Help Members By Posting Answers For Below Questions

Which is best ide for java?

523


How do you do a line break in java?

494


Difference between string s= new string (); and string s = "abv";?

742


What is the difference between break and continue statements?

547


What does string intern() method do?

589






What is __ init __ functions?

551


What is ide with example?

546


What does a za z0 9 mean?

564


What are design patterns and please explain?

572


What is the difference between hashmap and hashtable? What is an interface?

508


What types of index data structures can you have in java?

614


Can you sort a list in java?

531


What is the difference between yielding and sleeping?

559


Can abstract class have private constructor?

498


What is the difference between static binding and dynamic binding?

567