@@ -0,0 +1,1139 @@
+package com.njust.test.multiple.EscapeTest1;%0A%0A/**%0A * %E4%BB%A5%E4%B8%8B%E7%BB%93%E6%9E%9C%E6%A6%82%E7%8E%87%E6%80%A7%E5%87%BA%E7%8E%B0%EF%BC%8C%E5%87%BA%E7%8E%B0bad%E8%AF%B4%E6%98%8E%E7%A8%8B%E5%BA%8F%E5%87%BA%E9%97%AE%E9%A2%98%E4%BA%86%0A * -------------------%0A * num=999%0A * ok%0A * -------------------%0A * num=0%0A * bad...%0A * -------------------%0A */%0Apublic class Publisher%0A%7B%0A    public static volatile Publisher published;%0A    %0A    int num;%0A    %0A    Publisher(int number)%0A    %7B%0A        published = this;%0A        %0A        //yield or sleep a while,%E6%B3%A8%E6%84%8F%E8%BF%99%E9%87%8C%E6%98%AF%E4%B8%BA%E4%BA%86%E5%8A%A0%E5%A4%A7%E5%A4%B1%E8%AF%AF%E7%9A%84%E6%A6%82%E7%8E%87%0A        Thread.yield();%0A        // Initialization%0A        this.num = number;%0A        // ...%0A    %7D%0A    %0A    public static void main(String%5B%5D args)%0A    %7B%0A        new Thread(() -%3E %7B%0A            new Publisher(999);%0A        %7D).start();%0A        %0A        while (true)%0A        %7B%0A            %0A            if (Publisher.published != null)%0A            %7B%0A                System.out.println(%22num=%22 + Publisher.published.num);%0A                if (Publisher.published.num == 999)%0A                %7B%0A                    System.out.println(%22ok%22);%0A                %7D%0A                else%0A                %7B%0A                    System.out.println(%22bad...%22);%0A                %7D%0A                System.exit(0);%0A            %7D%0A        %7D%0A        %0A        //%0A    %7D%0A%7D%0A%0A%0A%0A%0A

Create Publisher.java