Java 8 functional interface with no arguments and no return value

Miguel Gamboa picture Miguel Gamboa · May 26, 2014 · Viewed 20.2k times · Source

What is the Java 8 functional 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

assylias picture assylias · May 26, 2014

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