Skip to content

Instantly share code, notes, and snippets.

@chathurangat
Created December 23, 2017 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chathurangat/8f08d1d586d2e0c3943550d723b4afe1 to your computer and use it in GitHub Desktop.
Save chathurangat/8f08d1d586d2e0c3943550d723b4afe1 to your computer and use it in GitHub Desktop.
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