Skip to content

Instantly share code, notes, and snippets.

@h-hub
Created December 1, 2018 04:04
Show Gist options
  • Save h-hub/e80d832e2b8720647d662ebeb9f3ec8d to your computer and use it in GitHub Desktop.
Save h-hub/e80d832e2b8720647d662ebeb9f3ec8d to your computer and use it in GitHub Desktop.
package javaPractice.thread;
class MultiThread {
public static void main(String args[]) {
new MyThread("One");
new MyThread("Two");
new MyThread("Three");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
System.out.println("Main thread Interrupted");
}
System.out.println("Main thread exiting.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment