threads
Ways to create a thread
public class ThreadExtend extends Thread {
public void run(){
for (int i = 0; i<3 ; i++) {
System.out.println("This is the class that extends Thread");
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}
}When to use which implementation
Thread Lifecycle

Daemon Threads
Last updated