Created
May 26, 2014 21:31
-
-
Save davidtsong/a12c70c04d14a8f42d80 to your computer and use it in GitHub Desktop.
Create a thread by implementing a runnable
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
public interface Runnable{ | |
public void run(); | |
} | |
public class MyRunnable() implements Runnable | |
{ | |
public void run() | |
{ | |
//Todo Code here | |
} | |
} | |
MyRunnable MyRunnable = new MyRunnable(); | |
new Thread(MyRunnable).start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment