Java Scanner Usage pressEnterToContinue()

Here you can find the source of pressEnterToContinue()

Description

Pause program and prompt user to press enter to continue program execution

License

Open Source License

Declaration

public static void pressEnterToContinue() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Scanner;

public class Main {
    private static final Scanner keyboard = new Scanner(System.in);

    /**/*ww w . jav  a 2s  . c  om*/
     * Pause program and prompt user to press enter to continue program execution
     */
    public static void pressEnterToContinue() {
        System.out.println("\n\nPress enter to continue...");
        keyboard.nextLine();
    }
}

Related

  1. parseDailyData(final List lines, final List priceValues, final List dailyPriceDate)
  2. parseExperimentName(String name)
  3. parseQueryString(String queryString)
  4. parseTime(String input)
  5. pathTokenList(String path)
  6. processLine(String aLine)
  7. queryMenu(Scanner in, String msg, LinkedList options)
  8. queryStr(Scanner in, String msg)
  9. removeFirstNLines(String text, int n)