Skip to content

Instantly share code, notes, and snippets.

@iaveryanov
Created December 19, 2012 11:50
Show Gist options
  • Select an option

  • Save iaveryanov/4336153 to your computer and use it in GitHub Desktop.

Select an option

Save iaveryanov/4336153 to your computer and use it in GitHub Desktop.
java: util methods
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