发布网友 发布时间:2022-04-23 02:32
共1个回答
热心网友 时间:2023-10-11 21:51
public class DoubleThread {
public static void main(String[] args) {
Thread t1 = new Thread() {
@Override
public void run() {
for (char i = 'a'; i <= 'z'; i++) {
System.out.println(i);
}
}
};
Thread t2 = new Thread() {
@Override
public void run() {
for (char i = 'A'; i <= 'Z'; i++) {
System.out.println(i);
}
}
};
t1.start();
t2.start();
}
}