pigeonPack = new LinkedList(); for (int i = 0; i < count; i++) { pigeonPack.add(new Pigeon() { @Override public void consume(String trashTypeName) { System.out.println("Pigeon is consuming " + trashTypeName); } }); } } class PigeonBoss implements Pigeon { public void consume(String trashTypeName) { System.out.println("Pigeon boss consumes only a kebab."); } } interface Pigeon { void consume(String foodType); } }]]> Use GotoDeclaration to jump to the declaration of a class or interface. To see implementations of a class/interface, use GotoImplementation.