Java??????????????
???????????? ???????[ 2014/4/3 9:42:30 ] ????????Java ???? ???
??????????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
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11