Java Console Pause pauseEnter()

Here you can find the source of pauseEnter()

Description

pause Enter

License

Open Source License

Declaration

public static void pauseEnter() 

Method Source Code


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;

public class Main {
    public static void pauseEnter() {
        pauseEnter("");
    }//w w  w  . j av a2s  . c o m

    public static void pauseEnter(String message) {
        pauseEnter(message, System.out);
    }

    public static void pauseEnter(String message, PrintStream printStream) {
        printStream.print(message);
        try {
            BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
            stdin.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. pause()
  2. pause()