I have a Dog class; Created 2 dogs with properties; now I want to create an arrayList that will contain the info of both dogs (and their parameters) and print out one of the values, how should I print a certain value of the dog parameters? for example: furLength of d1
public Dog(String nickName, int furLength, String favToy) {
this.nickName = nickName;
this.furLength = furLength;
this.favToy = favToy;
}
public class Main {
public static void main(String[] args) {
Dog d1 = new Dog("Archy", 5, "kong");
Dog d2 = new Dog("Arnavushik", 3, "socks");
System.out.println(d1.getFavToy());
ArrayList DogList = new ArrayList();
DogList.add(d1);
DogList.add(d2);
System.out.println(DogList.get(1));
}
}