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