How do you declare an ArrayList?

To declare a ArrayList use ArrayList<Type> name Change the Type to be whatever type of objects you want to store in the ArrayList, for example String as shown in the code below.

Leave a Reply

Your email address will not be published. Required fields are marked *