191 Star 1.6K Fork 454

Gitee Community / bullshit-codes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ArraySort.java 576 Bytes
一键复制 编辑 原始数据 按行查看 历史
tandy 提交于 2019-05-27 09:55 . 刚写完的排序算法就被开除了
/**
* 刚写完的排序算法就被开除了
*
* @author Tandy 2019/5/27 9:53
*/
public class ArraySort implements Runnable {
private int number;
public ArraySort(int number) {
this.number = number;
}
public static void main(String[] args) {
int[] numbers = new int[]{102, 338, 62, 9132, 580, 666};
for (int number : numbers) {
new Thread(new ArraySort(number)).start();
}
}
@Override
public void run() {
try {
Thread.sleep(this.number);
System.out.println(this.number);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
1
https://gitee.com/gitee-community/bullshit-codes.git
git@gitee.com:gitee-community/bullshit-codes.git
gitee-community
bullshit-codes
bullshit-codes
master

搜索帮助