fork(2) download
  1. import java.util.*;
  2.  
  3. class Example
  4. {
  5. public static void main (String[] args)
  6. {
  7. String[] strings = {
  8. "2002-10-24T13:51:25.417",
  9. "2001-03-25T23:41:24.234",
  10. "2008-10-05T04:41:56.004",
  11. "2013-04-10T22:14:06.852",
  12. "2005-08-24T05:05:01.080",
  13. "2015-11-20T17:32:27.303",
  14. "2003-07-16T06:32:07.703",
  15. "2005-03-20T08:28:18.440",
  16. "2009-04-17T13:20:09.499",
  17. "2002-11-04T06:39:55.287"
  18. };
  19. Arrays.sort(strings);
  20. for (String s : strings) {
  21. System.out.println(s);
  22. }
  23. }
  24. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
2001-03-25T23:41:24.234
2002-10-24T13:51:25.417
2002-11-04T06:39:55.287
2003-07-16T06:32:07.703
2005-03-20T08:28:18.440
2005-08-24T05:05:01.080
2008-10-05T04:41:56.004
2009-04-17T13:20:09.499
2013-04-10T22:14:06.852
2015-11-20T17:32:27.303