Skip to content

Instantly share code, notes, and snippets.

@Frdnspnzr
Created November 15, 2012 09:37
Show Gist options
  • Save Frdnspnzr/4077674 to your computer and use it in GitHub Desktop.
Save Frdnspnzr/4077674 to your computer and use it in GitHub Desktop.
Ententhread
package ente;
public class EntenThread extends Thread {
public static boolean maybe = false;
public static boolean isUserADuck() {
return maybe;
}
@Override
public void run() {
while (!isUserADuck()) {
System.out.print("Ente ");
try {
Thread.sleep(500);
} catch (InterruptedException e) {
//That's how I wake up!
System.out.print("Ente Ente Ente Ente ");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment