Writing instance::method fixes the receiver at the moment the reference is created, so the resulting functional interface only ever needs the remaining arguments, not the object itself.
String greeting = "Hello, ";
Function<String, String> prepend = greeting::concat;
System.out.println(prepend.apply("World"));
Hello, World
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-09-27