-4

What does "::" do in this code?

Files.walk(Paths.get("res")).forEach(System.out::println);

I know that we use ':' for an enhanced for loop but I never saw 2 of them together

user3491043
  • 129
  • 7

1 Answers1

0

Double colon :: is called Method Reference.

Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331