Почему в цикле while последняя функция не выполняется на каждой интеграции?

В цикле while последняя функция не выполняется (ch = StdIn.readChar()) на каждой итерации.

    LinkedList<String> names = new LinkedList<>();
    LinkedList<Integer> divisables = new LinkedList<>();
    LinkedList<Integer> dividers = new LinkedList<>();

    Scanner sc = new Scanner(System.in);

    String s = "a";

    while (!s.equals("q")) {

        StdOut.println("Input name: ");
        if (sc.hasNextLine())
            names.add(sc.nextLine());

        StdOut.println("Input first number: ");
        if (sc.hasNextInt())
            divisables.add(sc.nextInt());

        StdOut.println("Input second number: ");
        if (sc.hasNextInt())
            dividers.add(sc.nextInt());

        StdOut.println("Input 'q' to get out(or different symbol to continue):");
        if (sc.hasNextLine())
            s = sc.nextLine();
    }

Ответы (0 шт):