Here you can find the source of enterToContinue()
public static void enterToContinue()
//package com.java2s; //License from project: Open Source License import java.util.Scanner; public class Main { public static void enterToContinue() { Scanner scanner = new Scanner(System.in); System.out.println("Press enter to continue."); scanner.nextLine();/* w w w .ja va 2 s.c o m*/ } public static void enterToContinue(String customString) { Scanner scanner = new Scanner(System.in); System.out.println(customString); scanner.nextLine(); } }