Skip to content

Instantly share code, notes, and snippets.

@finnkvan
Created October 23, 2018 18:03
Show Gist options
  • Save finnkvan/eb6fe8b42729cae594c33ad2afed0304 to your computer and use it in GitHub Desktop.
Save finnkvan/eb6fe8b42729cae594c33ad2afed0304 to your computer and use it in GitHub Desktop.
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