What is the use of RUNNABLE interface in java?
Printable View
What is the use of RUNNABLE interface in java?
Runnable interface is a type of functional interface which is designed to provide a common protocol for objects that wish to execute code while they are active.
Runnable is an interface designed to encapsulate some independent unit of work that can run and do something useful and isn’t specifically expected to return a value at the end.
Hi Friends,
Runnable interface is a type of functional interface which is designed to provide a common protocol for objects that wish to execute code while they are active.
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method run. It is used to create thread.
public void run(): is used to perform action for a thread.
Runnable interface is a type of functional interface which is designed to provide a common protocol for objects that wish to execute code while they are active. The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread.
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run. This interface is designed to provide a common protocol for objects that wish to execute code while they are active.
Java runnable is an interface used to execute code on a concurrent thread. It is an interface which is implemented by any class if we want that the instances of that class should be executed by a thread. This method takes in no arguments.
Java runnable is an interface used to execute code on a concurrent thread. It is an interface that is implemented by any class if we want that the instances of that class should be executed by a thread. This method takes in no arguments.
Interface Runnable
The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run . This interface is designed to provide a common protocol for objects that wish to execute code while they are active.