Trying to wrap up a project. Everything works in it except it can't instantiate the animal into the designated array. This line is code that my instructor gave me, so I'm at even more of a loss. This is what I used to declare the array list:
private static ArrayList<Dog> dogList = new ArrayList<Dog>();
I then collect the information I needed and use the code below to try and add it to the array list. nthDog is a previously declared variable and the parameters are correct.
Dog nthDog = new Dog(name, breed, gender, age, weight, acquisitionDate,
acquisitionCountry, trainingStatus, reserved, inServiceCountry);
dogList.add(nthDog);
This code was sent to me by my instructor, however, when used it pulls up the errors ConcurrentModificationException and checkForComodification. Can't figure out what could be wrong.