Daily Uses of Lambda Expression

  1. We can replace anonymous inner class with Lamda
  2. We can iterate collections in a single line

We can replace anonymous inner class with Lamda :

FileFilter fileFilterLamda = (File pathname) -> pathname.getName().endsWith(".java"); 

We can iterate things in a single line :

List<Data> list = ....;
list.forEach(System.out::println);

Leave a Comment