@@ -0,0 +1,809 @@
+package github.banana;%0A%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0A%0Apublic class LocalTest %7B%0A    //public static final SimpleDateFormat format = new SimpleDateFormat(%22yyyy-MM-dd HH:mm:ss%22);%0A    public static final ThreadLocal%3CSimpleDateFormat%3E format = ThreadLocal.withInitial(() -%3E new SimpleDateFormat(%22yyyy-MM-dd HH:mm:ss%22));%0A%0A    public static void main(String args%5B%5D) %7B%0A        for (int i = 0; i %3C 3; i++) %7B%0A            (new Thread(() -%3E %7B%0A                //System.out.println(format.format(new Date()));%0A                System.out.println(format.get().format(new Date()));%0A                try %7B%0A                    Thread.sleep(2000);%0A                %7D catch (InterruptedException e) %7B%0A                    e.printStackTrace();%0A                %7D%0A            %7D)).start();%0A        %7D%0A    %7D%0A%7D%0A

test local thread var