Q:

Why can't I start a thread

Could you help me understand why my thread doesn't appear in the debugger.
Well, as you can see from the comment in the main method I can run perform() method of a Task instance. But when I try to start a thread, it doesn't start. Any break points don't show that the run() method of Thrd is called.
public class ParallelThreads {
    public static void main(String[] args) {
        Task t = new Task("C:\\FilesToRead\\1.txt");
        //System.out.println(t.perform()); // It works!
        Thread thread = new Thread(t);
    }
}

public class Thrd implements Runnable{
    TaskWithResult task;

    public Thrd(TaskWithResult task){
        this.task = task;
    }

    @Override
    public void run(){
        task.perform();
    }   

}

public interface TaskWithResult {
    long perform();    
}

public class Task implements TaskWithResult, Runnable {

    File fileToRead;

    public Task(String file) {
        fileToRead = new File(file);
    }

    long count = 0;

    @Override
    public void run(){
        perform();
    }

    @Override
    public long perform() {
        ...
        return count;
    }
}

A:

You just created instance of Thread, you need to start it by
thread.start();

