public class Test33 {
public static void main(String[] args) throws InterruptedException {
ThreadImp threadImp = new ThreadImp();
Thread thread1 = new Thread(threadImp);
thread1.start();
}
}
class ThreadImp implements Runnable{
public void run() {
for (int i = 0; i < 10; i++) {
System.out.println("hello world");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
public static void main(String[] args) throws InterruptedException {
ThreadImp threadImp = new ThreadImp();
Thread thread1 = new Thread(threadImp);
thread1.start();
}
}
class ThreadImp implements Runnable{
public void run() {
for (int i = 0; i < 10; i++) {
System.out.println("hello world");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}