Miguel Gamboa Miguel Gamboa - 1 year ago 218
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

return type?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download