Guest User

Untitled

a guest
Aug 30th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class Write implements Runnable {
  2.     write() {
  3.         new Thread(this).start();
  4.     }
  5.  
  6.     public void run() {
  7.         while(true) {
  8.             System.out.print("meow");
  9.             try {
  10.                 Thread.sleep(1000);
  11.             }
  12.             catch (Exception e) {
  13.             }
  14.         }
  15.     }
  16. }
  17.  
  18. public class Main {
  19.     public static void main(String[] args) {
  20.         new Write();
  21.         Scanner s = new Scanner(System.in);
  22.         while (true) {
  23.             String st = s.next();
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment