java cli press any key to continue code example Example: java pause program until key pressed System.in.read()