????6.2.2 ??????: ???1????????????s?? ?????1????Thread?????t?? ??s??????????????t???????.  ?????t.start()
????ò??????????.
?????????????:
????new Thread(new M_thrd_2()).start()
????????:
public class M_thread_expl2{
public static void g(){
M_thrd_2 s = new M_thrd_2();
s.id = 1;
Thread t1 = new Thread(s);
t1.start();
Thread t2 = new Thread(s);
s.id = 2;
t2.start();
}
}
??????g() ?????У?
???????????1????M_thrd_2?? ????s.
??????????s??????? ???????????????Thread?????t1 ?? t2. ??????????????.
?????:
????1. ???????????3?????? ????1???????(???g() ????????????). ???????????????? ?????????????????????????????????.
????2. Thread(object ob) ??1????????Thread?????????  ???е????ob ???????Runnable ???.
????3. ??????????? ?? ?????t1????????id = 1??    ?????????????t2?????к? t1?????id=2??  ???t1?? ??t2?????????1??????????.
?????????? ???????????????????????.
???????????:

????6.3 ????????????
????1.  ???1??????????Thread????????  ???2????????Runnable??????.
????2.  ??????:  ???1??????????????????start()?????? ???2????????????????????1????Thread????? ???????????start()????.
????3.  ?????????????? ??????1????????????????????? ???2 ???????????1?????? ???????Thread????? ????????????????????????????.
??????. ?????????Щ???÷???????.
????7.1 run()
?????????????????е???????д?????????. ?????????.  ??? ?????????????1?????????run()????????????? ????????????????????У? ????п??????????.
????7.2 Start()
??????1?????or???????????1??start()????. ????1???????? ??????????run()????.
???????: 1??????????????ù????start()?? ?????start()???????.
????7.3 stop()
??????1??1?????.
????7.4 setName() ?? getName()
???????ú?????????????.
????7.5 Thread.currentThread()
???????????????????static??????  ??????????????????.
???????????????????????????????.
????????1????????A.    ????run() ??????????? Thread.currentThread().getName() ????.
??????????????A.run()  ????????????(??????A???) ???????  ???????A????????????????.
??????????????A.start()?? ????ú???????A???????????????.
??????? С??
???????????????飬 ??????????????? sleep() ?? wait() ?????н???? ??Щ?????????????. ???????????????????????.