在调试java多线程程序时,我放了断点.启动方法后调用控件是不是要运行menthod你可以告诉我调试程序.
示例代码
class Test extends Thread {
public static void main(String[] args) {
try {
Thread t = new Thread(new Test());
t.start();
t.start();
} catch (Exception e) {
System.out.print("e ");
}
}
public void run() {
for(int i = 0; i < 2; i++)
System.out.print(Thread.currentThread().getName() + " ");
}
}
Run Code Online (Sandbox Code Playgroud) scjp ×1