62,615
社区成员
发帖
与我相关
我的任务
分享
public class TestThread {
public static void main(String[] args){
MyThread t = new MyThread();
t.start();
System.out.println("3");
}
}
class MyThread extends Thread{
public void run(){
System.out.println("2");
}
}
public class test {
public static void main(String[] args){
MyThread t = new MyThread();
t.start();
try{
t.join();
}
catch(InterruptedException e){
}
System.out.println("3");
}
}
class MyThread extends Thread{
public void run(){
System.out.println("2");
}
}
public class TestThread {
public static void main(String[] args) {
MyThread t = new MyThread();
t.start();
t.setPriority(8);
System.out.println("3");
}
}
class MyThread extends Thread{
public void run(){
System.out.println("2");
}
}
public class TestThread {
public static void main(String[] args){
MyThread t = new MyThread();
t.start();
try {
t.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("3");
}
}
class MyThread extends Thread{
public void run(){
System.out.println("2");
}
}