Miguel Gamboa Miguel Gamboa - 6 months ago 50
Java Question

Java 8 function interface with no arguments and no return value

What is the Java 8 function interface for a method that takes nothing and returns nothing?

I.e., the equivalent to to the C# parameterless

Action
with
void
return type?

Answer

If I understand correctly you want a functional interface with a method void m(). In which case you can simply use a Runnable.