0

What's a valid function signature for funSig?

funSig(() -> System.out.println());
Stefan K.
  • 7,701
  • 6
  • 52
  • 64

1 Answers1

7

A Runnable would work,

It matches a void return and no params.

Runnable runnable = () -> System.out.println();

And obviously it doesn't need to be Runnable, any Functional Interface that matches the signature will do.

Sleiman Jneidi
  • 22,907
  • 14
  • 56
  • 77