Skip to content

Instantly share code, notes, and snippets.

@andreburto
Created August 28, 2016 05:39
Show Gist options
  • Save andreburto/4e45caea8addc9f5bc0945d9cf127dcc to your computer and use it in GitHub Desktop.
Save andreburto/4e45caea8addc9f5bc0945d9cf127dcc to your computer and use it in GitHub Desktop.
OutWrite test
import java.util.*;
import java.text.*;
public class OwTest {
public static int counter = 0;
public static long delay = 100;
public static void main(String[] args) throws InterruptedException {
while (counter < 200) {
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd hh:mm");
System.out.print(counter+". ");
System.out.println("Hello, world!");
System.out.println(df.format(new Date()));
Thread.sleep(delay);
counter++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment