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

What are the differences between Java 1.0 and Java 2.0?

1681


Can we extend a class with private constructor?

528


What are 4 pillers of object orinted programming?

585


What are the 5 types of research methods?

589


Is string serializable in java?

547






What is null in java?

525


Can a main method be overloaded?

575


Which of the classes will have more memory allocated?

545


Which are different kinds of source code?

662


Is static a singleton?

527


What is jit compiler in java?

592


What is boolean false?

531


Explain reverse a linked list recursive java solution?

535


How do you reverse sort in java?

508


How to run a JAR file through command prompt?

720