A functional interface that accepts nothing and returns nothing

Is there a standard functional interface in the JDK that accepts nothing and returns nothing? I can not find him. Something like the following:

@FunctionalInterface interface Action { void execute(); } 
+85
java function java-8
May 30 '14 at 16:03
source share
1 answer

How about runnable:

 @FunctionalInterface public interface Runnable { /** * When an object implementing interface <code>Runnable</code> is used * to create a thread, starting the thread causes the object's * <code>run</code> method to be called in that separately executing * thread. * <p> * The general contract of the method <code>run</code> is that it may * take any action whatsoever. * * @see java.lang.Thread#run() */ public abstract void run(); } 
+120
May 30 '14 at 16:09
source share



All Articles