Created
December 23, 2017 10:26
-
-
Save chathurangat/8f08d1d586d2e0c3943550d723b4afe1 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
public class Application | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("main thread is started"); | |
try { | |
System.out.println("main thread will be slept for 5 seconds"); | |
Thread.sleep(5000); | |
System.out.println("main thread resumed after sleeping"); | |
} catch (InterruptedException ex) { | |
System.out.println("sleeping thread get interrupted"); | |
} | |
System.out.println("main thread completed"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment