This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OrderProcessor extends Thread { | |
public void run() { | |
System.out.println("Processing order in thread: " + Thread.currentThread().getName()); | |
} | |
} | |
public class Main { | |
public static void main(String[] args) { | |
OrderProcessor t1 = new OrderProcessor(); | |
t1.start(); |