Runnable

The functional interface for a task that takes no input and returns no result, used to give a thread work to do.

In more detail

Its single method is run. A lambda such as () -> System.out.println("work") is a Runnable. When a task must return a value or throw a checked exception, use Callable instead.

Related terms

Taught in

References

Certification courses