Understanding threads is key to writing efficient, concurrent Java applications.
Source Code
class HelloWorld extends Thread {
public void run() {
System.out.println("Hello from a thread!");
}
public static void main(String[] args) {
HelloWorld myThread = new HelloWorld();
myThread.start();
}
}