⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 directinsertionthread.java

📁 用java多线程实现对三种排序算法的比较
💻 JAVA
字号:
//DirectInsertionThread
public class DirectInsertionThread extends Thread {
	int n=10000;
	double i,j;
	Sort Thread2=new Sort();
	int array[]=new int[10000];
	public DirectInsertionThread(int array[])
	{
		this.array=array;
	}
	public void run()
	{
		i=System.currentTimeMillis();
		System.out.println("在直接插入法中:"+i);   //开始进行直接插入法排序时的时间
		Thread2.Bubble_Sort(array, n);
		j=System.currentTimeMillis();    //结束进行直接插入法排序时的时间
		System.out.println("用直接插入法排序所用的时间为:"+(j-i)+"ms");
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -