Java 8 method reference:- Method reference help us to point to methods by their names. A method reference is described by using :: (double colon) symbol.
A method reference can be used to point following types of methods:−
1. Static methods
2. Instance methods
3. Constructors using new operator (TreeSet::new)
Java 8 method reference is the shorthand syntax for a lambda expression that executes just ONE method. See the following syntax:-
Object :: methodName