Created
December 19, 2012 11:50
-
-
Save iaveryanov/4336153 to your computer and use it in GitHub Desktop.
java: util methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public final class Utils { | |
| private Utils() { | |
| } | |
| public static void echo(String msg) { | |
| System.out.println(msg); | |
| } | |
| public static void sleep(int millis) { | |
| try { | |
| Thread.sleep(millis); | |
| } catch (InterruptedException e) { | |
| e.printStackTrace(); | |
| } | |
| } | |
| public static void waitForEnterPressed() { | |
| try { | |
| echo("\nPress <Enter> to continue..."); | |
| System.in.read(); | |
| } catch (IOException e) { | |
| e.printStackTrace(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment