Skip to content

Instantly share code, notes, and snippets.

@Anonymus1
Created August 3, 2015 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anonymus1/2a17f9f5ec735887bd99 to your computer and use it in GitHub Desktop.
Save Anonymus1/2a17f9f5ec735887bd99 to your computer and use it in GitHub Desktop.
tutorial 1 for newboston
import org.omg.PortableServer.POAPackage.AdapterNonExistent;
import java.util.Random;
public class Anonymus implements Runnable{
String name;
int time;
Random rand = new Random();
public Anonymus(String s){
name = s;
time = rand.nextInt(1000);
}
public void run() {
try{
System.out.printf("%s is sleeping for %d%n", name, time);
Thread.sleep(time);
System.out.printf("%s is done", name);
} catch(Exception e){
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment