package com.lxxu.testthread;
public class ThreadDemo7{
public static void main(String[] args){
System.out.println("任务一");
System.out.println("任务二");
new Thread(()->{//子线程
int temp = 0;
for(int i=0;i<Integer.MAX_VALUE;i++){
temp += i;
}
});
System.out.println("任务N");
}
}
主线程子线程
猜你喜欢
转载自blog.csdn.net/qq_42740745/article/details/84642701
今日推荐
周排行