Guest User

Untitled

a guest
Aug 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. package helloworldapp;
  2.  
  3. /**
  4.  *
  5.  * @author Amanda
  6.  */
  7.  
  8. import java.io.*;
  9.  
  10. public class HelloWorldApp {
  11.  
  12.     /**
  13.      * @param args the command line arguments
  14.      */
  15.     public static void main(String[] args) {
  16.         String CurLine = ""; // Line read from standard in
  17.    9:        
  18.   10:        System.out.println("Enter a line of text (type 'quit' to exit): ");
  19.   11:        InputStreamReader converter = new InputStreamReader(System.in);
  20.   12:        BufferedReader in = new BufferedReader(converter);
  21.   13:
  22.   14:        
  23.   15:        while (!(CurLine.equals("quit"))){
  24.   16:            CurLine = in.readLine();
  25.   17:            
  26.   18:            if (!(CurLine.equals("quit"))){
  27.   19:                System.out.println("You typed: " + CurLine);
  28.   20:            }
  29.   21:        }
  30.   22:    }
  31. }
Add Comment
Please, Sign In to add comment