if i know the lenght of collection in hand, should I use Array or Arraylist? justify

Answer Posted / guest

If lenght of collection is known Array is prefered to use
because Arraylist is resizable where as array has constant
size and array is more faster than ArrayList.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the remote object implementation?

2001


How to deploy Jar, War files in J2EE?

2173


How would you create a button with rounded edges?

562


Which container method is used to cause a container to be laid out and redisplayed?

668


How are the elements of a borderlayout organized?

598






What is the difference between the session.update() method and the session.lock() method?

558


whats is mean by tiles in struts

1622


What are the pros and cons of detached objects?

549


Explain the different types of memory used by jvm?

614


How many times may an objects finalize() method be invoked by the garbage collector?

674


Why a component architecture for the java platform?

580


How can I avoid validating a form before data is entered?

554


Can I have an action without a form?

598


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

1738


Can I map more than one table in a cmp?

592