interface demoLambda{ void sayHello(); } public class main(String[]args){ demoLambda(()->System.out.println("hello")); } public void demoLambda(demoLambda d){ d.sayhello(); }
numbers.forEach( (n) -> { System.out.println(n); } );