Skip to content

Instantly share code, notes, and snippets.

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