??????????Java web?????????????????????????????????????????????????????????????Java?????????????????????????????????????????AWT??Socket????????I/O????д????????????????????????????????У????????????о??????NB??????????????????????????????????????????д?????6???2??????????????????????????????????????????????????????????????????????????????????????????????Java??????????????????????JavaSE????????Σ?????????????JavaEE???????????????????html??css??javascript?????п???????jquery??extjs?????????Struts??hibernate??spring????????????????linux??oracle??????????????????У????????????????????????????????л???????????????????????????????????????????о???Java??????????????????????????????????????????????????????????????????????????????????????????????

??????????????????JDK API???????????Щ?????д???????????????????????????StringBuilder?У?????????“??StringBuilder ???????????????????????????????????????????????StringBuffer??”?????????????????????????????????????????????????????????Ч????

????Count.java??

    public class Count { 
        private int num; 
        public void count???? { 
            for??int i = 1; i <= 10; i++?? { 
                num += i; 
            } 
            System.out.println??Thread.currentThread????.getName???? + "-" + num??; 
        } 
    }

????????????е?count?????????1?????10???????????????????????????????????????????????55??

????ThreadTest.java??

    public class ThreadTest { 
        public static void main??String[] args?? { 
            Runnable runnable = new Runnable???? { 
                Count count = new Count????; 
                public void run???? { 
                    count.count????; 
                } 
            }; 
            for??int i = 0; i < 10; i++?? { 
                new Thread??runnable??.start????; 
            } 
        } 
    }

?????????????10???????????????????

    Thread-0-55
    Thread-1-110
    Thread-2-165
    Thread-4-220
    Thread-5-275
    Thread-6-330
    Thread-3-385
    Thread-7-440
    Thread-8-495
    Thread-9-550