Skip to content

Instantly share code, notes, and snippets.

@figengungor
Created March 12, 2013 13:25
Show Gist options
  • Select an option

  • Save figengungor/5142844 to your computer and use it in GitHub Desktop.

Select an option

Save figengungor/5142844 to your computer and use it in GitHub Desktop.
Java >> Threads
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