Created
March 12, 2013 13:25
-
-
Save figengungor/5142844 to your computer and use it in GitHub Desktop.
Java >> Threads
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
| public class Thread1{ | |
| Thread th = new Thread(); | |
| public Thread1(){ | |
| try{ | |
| for (int i=0;i<5;i++) | |
| { | |
| System.out.println("yov"); | |
| th.sleep(2000); | |
| } | |
| } | |
| catch(Exception e) | |
| { | |
| System.out.println("errrror"); | |
| } | |
| } | |
| public static void main(String [] args) { | |
| new Thread1(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment