Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. package thread;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6.  
  7. public class MainClass {
  8.  
  9.     public static void main(String[] args) throws IOException {
  10.         Thread cl = new Clock(1000);
  11.         cl.start();
  12.        
  13.         BufferedReader reader =
  14.                 new BufferedReader(new InputStreamReader(System.in));
  15.        
  16.         String input = null;
  17.         do {
  18.             input = reader.readLine();
  19.             System.out.println("eco: " + input);
  20.         } while(!input.equals("exit"));
  21.         System.exit(0);
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement