It is not clear what you want to do with your
ArrayList
.
If you are looking for an example on how to use
ArrayList
collection check out
this[
^] useful tutorial.
Also you talk about
"use class of list type", so I suggest you to have a look at
List<T>[
^] tutorial too.
If the project you are working on is compatible then it is better to use generic list (
List<T>
). You can see why at the end of
ArrayList
tutorial ("
Should I use List<T> instead?" section). :)