编辑代码

class Main {
    public static void main(String[] args) {
        MyThread thread = new MyThread();
        thread.start(); // 启动线程
    }
}

class MyThread extends Thread {
    @Override
    public void run() {
        System.out.println("Thread is running.");
    }
}