Java tutorial
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { public static int keyPress(String msg) { System.out.println(msg); try { int ret = System.in.read(); System.in.skip(System.in.available()); return ret; } catch (IOException e) { return 0; } } }