I already looked up the Right Solution - so I already know how to solve the task. I still don't understand why I get a NullPointerException if I write the run() method like this:
public class TaskManipulator implements Runnable, CustomThreadManipulator{
    private Thread thread;

    @Override
    public void run() {

        while(!thread.isInterrupted()){
            System.out.println(thread.getName());
            try{
                Thread.sleep(100);
            } catch (InterruptedException e) {
                break;
            }
        }
    }

    @Override
    public void start(String threadName) {
        thread = new Thread(new TaskManipulator(), threadName);
        thread.start();
    }

    @Override
    public void stop() {
        thread.interrupt();
    }
}
1.How can the "thread" field be null - it was just initialized in the start method? 2. The same goes for the sleep() method - why do I have to call the static Thread.sleep(), why can't I call thread.sleep()? 3.I also don't understand the Constructor Thread(Runnable target, String name) . I tried to read in the Oracle documentation but don't really know what they mean by "Allocates a new Thread object so that it has target as its run object, has the specified name as its name" is the target the Thread itself now? Thanks in advance for your time. Maybe you can give me a hint or good resources to learn for this topic. I always try to do the tasks with the information provided by Codegym first, but with this topic I might do it the other way around - doing another Tutorial first and do the tasks later.