on 10-17-2007 1:00 PM
Hi All,
I have a ArrayList in my application and some objects are added to that arraylist for ex: "arr.add("document");
I am unable to understand the concept of this arraylist. What type of attributes can be added to arraylist.
Thanks in advance.
Bharat,
You can add any Java object to the Array List. In the Java object heirarchy all the objects extends Object and hence you can add any Java object but not primitive types like int, float double etc. If you would like to add primitive types, go for the corresponding Java objects Float, Double etc. Hope I am clear here.
Thanks!
Surya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharath,
Check this:
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html">http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html</a>
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.