You have a class that implements the Runnable interface.
class RunnableWorker implements Runnable {
@Override
public void run() {
// the method does something
}
}
1) Create three threads using instances of RunnableWorker. Set the names of these threads to "worker-X", where X is any suffix. Use the Thread(Runnable target, String name) constructor to pass a thread name on thread creation.
2) Start all created threads. The method run of each instance must be executed in a new thread.
Note: you don't need to rewrite the given class; it will be added to your solution automatically.