Method references are short hand of lambda expression. It is an easy way to delegate a call to an existing method. The method is referenced by using the class name or the object reference with :: separating the method name e.g. We can call System.out.println with a below statement: List < Integer > numbers = Arrays . asList ( 1 , 2 , 3 , 4 , 5 , 6 ); numbers . forEach ( System . out :: println ); package com.corejava.LambdaExpressions.examples; //method references are short hand of lambda expression public class MethodReferences { interface IMovie { Boolean check(Integer id); } private void testMovieStaticMethodRef() { IMovie movie1 = (i) -> i < 100 ; // movie id less than 100 are classic movies IMovie movie2 = MethodReferences:: isClassic ; System. out .println(movie1.check( 100 )); System. out .println(movie2.check( 99 )); } private void testMovieInstanceMethodRef() { IMovie movie1 = ...
"Observation of infants where we may be able to sense the progress of the awakening of consciousness-Eugen Wigner