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

When is update method called?

676


Which oo concept is achieved by using overloading and overriding?

542


What is better- service oriented or batch oriented solutions?

1543


List types of storage classes in java?

626


Can we write class inside a class in java?

557






What is native method in java?

571


Write code of any action class?

552


What are recursive functions? Give some examples?

624


Is the empty set a singleton?

544


What is derived datatype?

631


What is object-oriented programming?

578


When is the finally clause of a try-catch-finally statement executed?

510


What is meant by design patterns?

593


Why is whitespace important?

563


What is a numeric digit?

594