fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class MyThread implements Runnable{
  5. public void run() {
  6. try{
  7. Thread.sleep(500);
  8. }catch(Exception e){}
  9. System.out.println("thread");
  10. }
  11. }
  12.  
  13. class Main{
  14. public static void main (String[] args) throws java.lang.Exception{
  15. new Thread(new MyThread()).start();
  16. System.out.println("main");
  17. }
  18. }
Success #stdin #stdout 0.07s 380480KB
stdin
Standard input is empty
stdout
main
thread