static void pauseForUserInput ( ) { System . out . println ( "Press the Enter/Return key to continue.." ) ; Scanner in = new Scanner ( System . in ) ; in . nextLine ( ) ; in . close ( ) ; }
Waits for user to press a key before continuing . Useful for connecting to a profiler