Oct 26, 2018

Java Double Colon operator

It is used as a method reference by replacing lambda expression.

Syntax is className::methodName()

for example, if we want to print a list :

List<String> strings = Arrays.asList("Bruce Lee", "Jacky Chen");
strings.forEach(System.out::println);