Example of Lamdas and Method reference



1) Lamda 
(Item item) -> item.getName() 

1) Method Reference
Item::getName

2) Lamda
()->Thread.currentThread().dumpStack()

2) Method reference
Thread.currentThread()::dumpStack

3) Lamda
(str,i)->str.substring(i)

3) Method reference
String::substring

4) Lamda
(String s) -> System.out.println(s);

4) Method reference
System.out::println