Which functional interface represents a function that takes no arguments and returns a value?

Java Professional Easy

Java Professional — Easy

Which functional interface represents a function that takes no arguments and returns a value?

Key points

  • Supplier is used for supplying values without taking any input.
  • Runnable is for tasks that do not return a value.
  • Consumer is for functions that take an argument but do not return a value.

Ready to go further?

Related questions