fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. import java.util.concurrent.* ;
  8. import java.time.* ;
  9.  
  10. /* Name of the class has to be "Main" only if the class is public. */
  11. class Ideone
  12. {
  13. public static void main (String[] args) throws java.lang.Exception
  14. {
  15.  
  16. ExecutorService es = Executors.newSingleThreadExecutor() ;
  17. es.submit( ( ) -> System.out.println( "Hello. " + Instant.now() ) ) ;
  18. es.submit( ( ) -> System.out.println( "Bonjour. " + Instant.now() ) ) ;
  19. es.submit( ( ) -> System.out.println( "Aloha. " + Instant.now() ) ) ;
  20. es.submit( ( ) -> System.out.println( "Ciào. " + Instant.now() ) ) ;
  21. es.submit( ( ) -> System.out.println( "Shwmai. " + Instant.now() ) ) ;
  22.  
  23. }
  24. }
Time limit exceeded #stdin #stdout 5s 38452KB
stdin
Standard input is empty
stdout
Hello. 2019-11-29T09:10:13.426987Z
Bonjour. 2019-11-29T09:10:13.472719Z
Aloha. 2019-11-29T09:10:13.473177Z
Ciào. 2019-11-29T09:10:13.473479Z
Shwmai. 2019-11-29T09:10:13.473974Z