Method reference
It is a feature of java 8
Method reference means using a method without calling it directly
It is used with functional interfaces and works like a shortcut to lambda expression
Instead of using lambda expression we can use method refrences
Tyoes of Method references
We are having 3 tyoes
Reference to static maethod
References to non static method
Reference to constructor
Reference to Static method
Syntax
Class name :: static MethodName
Reference to an Instance or non-Static Method
Syntax
Class name :: non static MethodName
References to a Constructor
Syntax
Class:: new
Acheiveing multiple inheritance using Interface