import java.util.Date;
class mythread extends Thread
{
Thread t = new Thread(this);
public mythread()
{
//todo
}
public void start()
{
//todo
t.start();
}
public void run()
{
int i = ( 1 << 15 ) - 1;
Date begin = new Date();
long beginTime = begin.getTime();
int index = i;
while(index >= 0)
{
System.out.println(index);
index = index - 500;
}
Date end = new Date();
long endTime = end.getTime();
System.out.println("totla time = " + (endTime - beginTime) + " ms");
}
}
public class j21thread
{
public static void main(String args[])
{
mythread mt = new mythread();
mt.start();
}
}