Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. package ee.rebeltest;
  2.  
  3.  
  4. public class Runner {
  5.     public static void main(String[] args) throws Exception {
  6.         new PrintingThread().start();
  7.     }
  8. }
  9.  
  10. class PrintingThread extends Thread {
  11.     @Override
  12.     public void run() {
  13.         while (true) {
  14.             System.out.println("Test");
  15.             try {
  16.                 Thread.sleep(1000);
  17.             } catch (InterruptedException e) {
  18.                 e.printStackTrace();
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement