Created
October 23, 2018 18:03
-
-
Save finnkvan/eb6fe8b42729cae594c33ad2afed0304 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 com.pivincii; | |
public class FirstThread extends Thread { | |
public void run() { | |
try { | |
System.out.println("Start " + currentThread().getName()); | |
sleep(5000); | |
System.out.println("End" + currentThread().getName()); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
} | |
public static void main(String[] args) { | |
new FirstThread().start(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment