Created
December 1, 2018 04:04
-
-
Save h-hub/e80d832e2b8720647d662ebeb9f3ec8d to your computer and use it in GitHub Desktop.
This file contains 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
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