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. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone implements Runnable {
  9. private static String msg = "HCL";
  10.  
  11. static {
  12. Thread t = new Thread(new Runnable() {
  13. @Override
  14. public void run() {
  15. // TODO Auto-generated method stub
  16. msg = "Technologies";
  17. }
  18. });
  19. t.start();
  20. }
  21. public static void main(String[] args) throws Exception {
  22. System.out.println(msg);
  23. Thread.sleep(1000);
  24. System.out.println(msg);
  25. }
  26. @Override
  27. public void run() {
  28. // TODO Auto-generated method stub
  29. }
  30. }
Success #stdin #stdout 0.07s 380480KB
stdin
Standard input is empty
stdout
HCL
Technologies