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 you will synchronize a piece of your code? : Java thread

523


How a string is stored in memory?

571


Can a static class implement an interface?

541


Does set allows null in java?

497


What about interthread communication and how it takes place in java?

536






What is strings in java?

576


What is thread pool? How can we create thread pool in java?

614


What is a static method in java?

530


What is the range of a character variable?

536


Tell me the Importent classes in net package?

1578


What is meant by distributed application? Why are we using that in our application?

542


Explain yield() method in thread class ?

611


What is the function of java?

508


Highest level event class of the event-delegation model?

3491


What is a java lambda expression?

545