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

which deployment descriptor element is used to configure the authentication method? a. auth-config b. login-config c. sec-config

1 Answers  


suppose i open my yahoo mail.then copy the url. then sign out & close browser.then open browser paste that url on the browser.will i get my mail opened or not? i know it ill not.but how it work.how i create like this type of secure site?

7 Answers  


Define prototype?

0 Answers  


what is an isolation level?

0 Answers  


What is the difference between the string and stringbuffer classes?

0 Answers  


can we write implementation for a method with in another method?

3 Answers   Cap Gemini,


What is J2EE?

2 Answers  


What is Bootstrapping in RMI?

1 Answers  


how the action can be map from jsp page to bean class in mvc1

1 Answers   Photon,


1) which method of the RequestDispatcher cannot be called once the output is sent to the client? a. forward b. include c. both a&b 2) which interface should an object implement to get notified of changes to the list of active sessions in a web application? a. HttpSessionListener b. HttpSessionActivationListener c. HttpSessionAttributeLIstener 3) A user can select multiple locations from a list box on an HTML form, which of the following methods can be used to retrieve all the selected location? a. getParameter() b. getParameterValues() c. getParamValues() 4) which of the following methods should be used to send character text to the client? a. ServletResponse.getWriter() b. ServletResponse.getOutputStream() c. ServletResponse.getOut() 5) which implicit object is always available in a JSP page? a. exception b. session c. out 6) which inclusion mechanism doesn't include the source of the page, rather the output of the page. a. include directive b. jsp:include action c. Bothe a& b 7) which attribute of the page controls whether a page participates in session or not? a. session-allowed b. session c. isSession

1 Answers  


What is meant by Superconductivity?

4 Answers  


How would you reatach detached objects to a session when the same object has already been loaded into the session?

0 Answers  


Categories