how do i print the element \"e\" in arraylist \"list\" out?
ArrayList list = new ArrayList(); Dog e = new Dog(); list.add(e); Syste
You should override toString() method in your Dog class. which will be called when you use this object in sysout.
toString()
Dog