当然合适这个给大一学生看合适吗?
没看明白,怎么排序的,sleep(this.number),休眠数组里面的数字?
哈哈,林妹妹宝哥,我现学现用,原程序代码中有编译错误,我改正了。可运行代码如下,你可以到在线java运行环境https://www.compilejava.net/ 运行一下:
public class ArraySort implements Runnable {
private final int number;
public ArraySort(int number) {
this.number = number;
}
public static void main(String[] args) {
int[] numbers = new int [] {2, 3, 1};
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) {
}
}
}
Windows 用Visual Studio哦, 很流行吗?现在开发java都这个了,上次我还是用eclipse。有没有什么好的C/C++开发工具。最后一次我还用makefile的shell那。调试起来好麻烦呀,每步都要打印出来看。
Windows 用Visual Studio
Mac 用Clion
不过想免费的话,就给Netbeans, Eclipse, Intellij 装C/C++插件。
Windows 用Visual Studio
Mac 用Clion
不过想免费的话,就给Netbeans, Eclipse, Intellij 装C/C++插件。
宫保语文不行啊,"不过想免费的话"是转折语气Clion免费?
宫保初出茅庐,不知江湖险恶我用visual studio都是免费啊
不免费。
你是干IT吗?
这个年代软件没有插件就像美女没有口红。
Chrome, Jenkin, Jira, Intellij ... 没有插件那就是一堆垃圾。