I was looking for a functional interface provided by java.util package which do not take argument and returns void. There are number of Functional interfaces in java.util package like Consume and Supplier, but i am looking for a functional interface without argument and without return type. I know that i can create some interface like 'Operation' which will serve my purpose, but if it is already available in java.util, it would be good to use.
Which Functional interface in java.util package has a method with NO arguments and void return type?
Asked
Active
Viewed 124 times
1 Answers
2
You're looking for java.lang.Runnable

Nicholas K
- 15,148
- 7
- 31
- 57

talex
- 17,973
- 3
- 29
- 66
-
Thanks for reply , I suppose, it would be confusing to use without using as thread. – Gunwant Dec 13 '18 at 06:10
-
1It will be confusing only for beginners, but everything is confusing for them :) – talex Dec 13 '18 at 06:16