Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package whileLoop;
- import java.util.Scanner;
- public class P01ReadText {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- while (true) {
- String command = scanner.nextLine();
- if (command.equals("Stop")){
- break;
- }
- System.out.println(command);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement