Using an example:
Let say I have a class call Gun. I have another class call Bullet.
Gun
Bullet
Class Gun has an
When using Java8 it would be more easier and a single liner only.
gunList.get(2).getBullets().forEach(n -> System.out.println(n));