List of usage examples for java.lang String format
public static String format(Locale l, String format, Object... args)
From source file:Main.java
public static String toTime(int time) { time /= 1000;//w ww. ja v a 2 s . c o m int minute = time / 60; int second = time % 60; minute %= 60; return String.format("%02d:%02d", minute, second); }
From source file:Main.java
static void checkPositiveOrZero(float number, String name) { if (number < 0) throw new IllegalArgumentException(String.format("%s %f must be positive", name, number)); }
From source file:Main.java
static void checkPositiveOrZero(float number, String name) { if (number < 0) throw new IllegalArgumentException(String.format("%s %d must be positive", name, number)); }