import java.util.List; class Foo { static void foo(List ls) { ls.forEach(System.out::println); } }