Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lauffaehig implements Runnable {
- Thread t;
- public Lauffaehig() {
- // Neues Thread Objekt
- t = new Thread(this);
- // Starte Thread
- t.start();
- }
- /**
- * Interface Methode run
- */
- public void run() {
- // Endlosschleife
- while(true) {
- // Mache irgendetwas
- try {
- // Warte 200 Millisekunden
- Thread.sleep(200);
- }
- catch(Exception e) {
- // Mache nix
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement