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

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

898


Difference between loadclass and class.forname?

816


Can we sent objects using Sockets?

876


Why won’t the jvm terminate when I close all the application windows?

986


What is the diffrence between a local-tx-datasource and a xa-datasource?

816


How a component can be placed on Windows?

2500


Name the eight primitive java types.

832


What are the types of scaling?

813


What is mdb and what is the special feature of that?

814


Which class is the immediate superclass of the menucomponent class?

932


What is glasgow?

798


What is the difference between static and non-static with examples?

1613


What is a policy?

2040


How would you create a button with rounded edges?

772


what are RemoteObjects?

2479