1Java provides a feature called method
2reference in Java 8. Method reference
3is used to refer method of functional interface.
4 It is compact and easy form
5 of lambda expression. Each time when
6 you are using lambda expression to just
7 referring a method, you can replace your
8 lambda expression with method reference.
9
10Types of Method References:
11- Reference to a static method. Syntax ==> ContainingClass::staticMethodName
12- Reference to an instance method. Syntax ==> containingObject::instanceMethodName
13- Reference to a constructor. Syntax ==> ClassName::new