Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package helloworldapp;
- /**
- *
- * @author Amanda
- */
- import java.io.*;
- public class HelloWorldApp {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- String CurLine = ""; // Line read from standard in
- 9:
- 10: System.out.println("Enter a line of text (type 'quit' to exit): ");
- 11: InputStreamReader converter = new InputStreamReader(System.in);
- 12: BufferedReader in = new BufferedReader(converter);
- 13:
- 14:
- 15: while (!(CurLine.equals("quit"))){
- 16: CurLine = in.readLine();
- 17:
- 18: if (!(CurLine.equals("quit"))){
- 19: System.out.println("You typed: " + CurLine);
- 20: }
- 21: }
- 22: }
- }
Add Comment
Please, Sign In to add comment