, new SimpleDateFormat("HH:mm:ss.SSS") , , .
, . , , .
, , Calendar.getInstance().getTime() / . , , , , , . , , , , , .
:
public class Test {
private static DateFormat DATE_FORMAT = new SimpleDateFormat("HH:mm:ss.SSS");
public static void main(String[] args) {
for (int i = 0; i < 100; i++) {
new Thread(new Runnable() {
@Override
public void run() {
Date time = Calendar.getInstance().getTime();
synchronized (DATE_FORMAT) {
System.out.println(DATE_FORMAT.format(time));
}
}
}).start();
}
}
}