AllExperts > Experts 
Search      

Java

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Java Answers
Question Library

Ask a question about Java
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Beenish Zaidi
Expertise
I can answer questions related to Core Java(no swing), Spring, to some extent i can try helping in solving problems related to JSP's and Servlets as well. Have hands on experience on Jakarta Struts and Struts Validator framework. Any questions within this domain are welcome.Just started with Design patterns, so any questions will be welcome in this category also.

Experience
2 and a half years.

Education/Credentials
Bachelors in Computer Sciences

 
   

You are here:  Experts > Computing/Technology > Focus on Java > Java > arraylist

Topic: Java



Expert: Beenish Zaidi
Date: 7/1/2008
Subject: arraylist

Question
i want to use arraylist of beans to store data throughout my application but i am unable to prevent arraylist from getting initialize eachtime whenever i am callig that file where i am using arraylist.
how can i initialize arraylist once and use it throughout the application??
please give me suggesions
thanks in advance.

Answer
Well Nidhi,
Glad to recieve your note.

One way to use this arraylist throughout your program is to
make it static and declare it at the class level. Additionally
it is hard to tell, without seeing your code, that what scenario
you are exactly facing.

Hope this helps.
Ben

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.