这个代码的运行结果有人给解释一下吗?最好是带图的那种;

这个代码的运行结果有人给解释一下吗?

import java.util.Arrays;
public class VisibilityDemo {
   volatile static  int []array=new int[2];
    private static class Tests{
        public  void methodA(){
           array[0]=100;
           array[1]=200;
            System.out.println(Arrays.toString(array));
        }
    }
    public static void main(String[] args) {
        Tests tests= new Tests();
        Thread thread = new Thread(() -> {
         tests.methodA();
        });
      
       array[0]=888;
       array[1]=999;
        thread.start();
    }
}

能解释一下这个程序怎么运行出结果的吗?

img

就调用了一个methodA(),里面有3行代码,从上到下依次执行,还有啥要解释的吗?