how do i print the element \"e\" in arraylist \"list\" out?
ArrayList list = new ArrayList(); Dog e = new Dog(); list.add(e); Syste
Here is an updated solution for Java8, using lambdas and streams:
System.out.println(list.stream() .map(Object::toString) .collect(Collectors.joining("\n")));
Or, without joining the list into one large string:
list.stream().forEach(System.out::println);