Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. Scanner scan = new Scanner(System.in);        
  2.     String word = "";
  3.        StringBuilder fullText = new StringBuilder();        
  4. int i = 0;
  5.        while(!((word=scan.nextLine()).equals("quit"))) {
  6.            fullText.append(word);
  7.        }
  8.        System.out.println(fullText.toString());
  9.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement