fork download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Accessor
  5. {
  6. static public void access(Integer[] a) { a[0] = 1; }
  7. }
  8.  
  9. class Main
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. final Integer[] a = new Integer[1];
  14. a[0] = 0;
  15. new Thread() { @Override public void run() { Accessor.access(a); } }.start();
  16. Thread.sleep(1000);
  17. System.out.println(a[0]);
  18. }
  19. }
Success #stdin #stdout 0.06s 380480KB
stdin
Standard input is empty
stdout
1