As Jesper says, the equivalent of a function pointer in C/C++ is the method reference in Java.
For example,
does what you think it does. But lambda expressions are more powerful. Look at Kernighan & Ritchie's example for function pointers:
Here, strcmp is the equivalent of
String::compare. And numcmp is a function that they wrote elsewhere. But in C, you
must write it as a separate function. With lambda expressions, you can write
and then just pass it to Arrays.sort.
Cheers,
Cay