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



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

Answer / 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

More Advanced Java Interview Questions

what is catalina in tomcat server.

11 Answers   IBM,


What is JasperReports?

2 Answers  


Why is string immutable in java?

0 Answers  


how i secure my site with the https protocol.what are the steps?

0 Answers  


difference between sql exception class and sql warning class

1 Answers  






Why RMI required an interface?

1 Answers  


Why do I get a duplicate name error when loading a jar file?

0 Answers  


What happens when a thread cannot acquire a lock on an object?

0 Answers  


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

1 Answers  


Where can I ask questions and make suggestions about seam?

0 Answers  


Difference between new operator and class.forname().newinstance()?

0 Answers  


What is the infobus?

0 Answers  


Categories