InterviewSolution
Saved Bookmarks
| 1. |
In Java 8, what is Method Reference? |
|
Answer» Method reference is a compact way of referring to a method of FUNCTIONAL interface. It is USED to refer to a method without invoking it. :: (DOUBLE colon) is used for describing the method reference. The syntax is class::methodName For e.g.: Integer::parseInt(str) \\ method reference str -> Integer.ParseInt(str); \\ EQUIVALENT lambda |
|