GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java

 Print  |  
Question:  Array List Collections

Answer: What is Use of declaring an array list object like
List list = new ArrayList() rather than creating object like ArrayList arr = new ArrayList();


May 05, 2008 06:14:34 #2
 zizou   Member Since: May 2008    Total Comments: 2 

RE: Array List Collections
 
Hi
this technique is much more advantageuous as it'easy to cast the created object in runtime easily to another subclass of the list super classs.
     

 

Back To Question