fork(4) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13.  
  14. for (int i = 0; i < 10; i++) {
  15. System.out.printf("i : %d, datetime : %s\n", i, new Date());
  16. Thread.sleep(1000);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.12s 2841600KB
stdin
Standard input is empty
stdout
i : 0, datetime : Fri Oct 13 03:14:55 GMT 2017
i : 1, datetime : Fri Oct 13 03:14:56 GMT 2017
i : 2, datetime : Fri Oct 13 03:14:57 GMT 2017
i : 3, datetime : Fri Oct 13 03:14:58 GMT 2017
i : 4, datetime : Fri Oct 13 03:14:59 GMT 2017
i : 5, datetime : Fri Oct 13 03:15:00 GMT 2017
i : 6, datetime : Fri Oct 13 03:15:01 GMT 2017
i : 7, datetime : Fri Oct 13 03:15:02 GMT 2017
i : 8, datetime : Fri Oct 13 03:15:03 GMT 2017
i : 9, datetime : Fri Oct 13 03:15:04 GMT 2017