system in example in java

Solutions on MaxInterview for system in example in java by the best coders in the world

showing results for - "system in example in java"
Marco
13 Jan 2017
1package com.mkyong.io;
2
3import java.util.Scanner;
4
5public class JavaScanner {
6
7    public static void main(String[] args) {
8
9        Scanner scanner = new Scanner(System.in);
10
11        String input = "";
12        while (!"q".equalsIgnoreCase(input)) {
13
14            System.out.print("Enter something (q to quite): ");
15
16            input = scanner.nextLine();
17            System.out.println("input : " + input);
18        }
19
20        System.out.println("bye bye!");
21    }
22
23}