Here you can find the source of pressEnterToContinue()
public static void pressEnterToContinue()
//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(); } }