how do i print the element \"e\" in arraylist \"list\" out?
ArrayList list = new ArrayList(); Dog e = new Dog(); list.add(e); Syste
First make sure that Dog class implements the method public String toString() then use
Dog
public String toString()
System.out.println(list.get(index))
where index is the position inside the list. Of course since you provide your implementation you can decide how dog prints itself.