• + 0 comments

    " :: " stands for Method Reference .It is most commonly used for instance methods of a class.As you might have observed ,unless you have something like this: d -> d.getCgpa()>10 in filter operations ,in all other(most commonly) operations viz sorted,map etc. you can use :: like:

    .map(Dish::getCalories) . A wonderful example would be for forEach : .forEach(System.out::println) !!