You just need to spend some time reading some basic tutorial on how to use ArrayList
. You will find thousands if you just google it.
Originally Posted by 93tomh
Read again post #8.
You need to use the ArrayList's add
method. Do you know how to call non static methods of a class? - You create a new object of the class (instantiate the class) and then you call it with
In your code you have created a new ArrayList
). With the above syntax you can call any method you want. Thus, read the ArrayList javadoc, find the method that suits your requirements (in your case the add
method) and call it with