Last active
May 9, 2016 23:11
-
-
Save sniper7kills/fcc90d89cbf7803ffd1edc412be7ad63 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* ThreadEx1.java:A simple program creating and invoking a thread object by extending the standard Thread class. */ | |
class MyThread extends Thread { | |
public void run() { | |
System.out.println(“ this thread is running ... ”); | |
} | |
} | |
class MAINPROGRAM { | |
public static void main(String [] args ) { | |
MyThread t = new MyThread(); | |
t.start(); | |
MyThread t2 = new MyThread(); | |
t2.start(); | |
t.stop(); | |
t2.stop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment