Java 8 functional interface with no arguments and no return value

后端 未结 3 687
心在旅途
心在旅途 2020-12-08 18:00

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 wit

3条回答
  •  死守一世寂寞
    2020-12-08 18:39

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

提交回复
热议问题