Java Ïß³Ì
Java.lang.Thread
Ïß³Ì---³ÌÐòµÄ²»Í¬Ö´Ðз¾¶
Ö÷Ïß³Ìmain·½·¨ ·ÖÖ§Ïß³Ì
Ï̵߳ÄÆô¶¯·¢·¨£º
Á½¸ö
1.
ʵÏÖRunnalble½Ó¿ÚʵÏÖRUN
New Thread(new Runnable).start
2.¼Ì³ÐThreadʵÏÖRUN
New Thread().start
ÔÀí£º
½¨ÒéʹÓõÚÒ»ÖÖ·½·¨
×¢ÒâÇø·Ö·½·¨µ÷ÓÃrunÓëÏß³ÌÆô¶¯µÄ²»Í¬start
Thread.Sleep(1000); ÔÝÍ£¶¥³¤Ê±¼ä
t.Start();
t.Join(); ºÏ²¢£¬ÊÇÖ¸µ±Ç°Ï߳̽áÊøºó²Å¿ªÊ¼ÔËÐÐÆäËûÏß³Ì
t.Start();
t.Yield(); ÔÝʱÈóö×ÊÔ´£¬ÈøøÆäËûÏß³Ì
ÓÅÏȼ¶£º
priority
¿ÉÒÔÉèÖÃ
Ïß³Ìͬ²½¹Ø¼ü´Ê£º£¨ÔÚÒÔºóµÄÎÄÕÂÖÐÒ»Ò»½²½â£©
Synchronized ¼ÓËø
¶Ôµ±Ç°´úÂë¿é¼ÓËø
²»ÄÜÌ×׿ÓËø
Waitµ±Ç°¶ÔÏóÖÐÏß³ÌÍ£Ö¹¡£±ØÐëÊÇsynchronizedµÄ,µÃµ½ºó·ÅÆúËø¡£µÈ´ýnotify
Notify
Object.Wait()/Object.Notify();
notifyAll()
ËÀËø£º
³ÖÓв¢µÈ´ý
Ïà¹ØÎĵµ£º
×¢Ê͵ÄÔÔò
1¡¢ ×¢ÊÍÐÎʽͳһ
ÔÚÕû¸öÓ¦ÓóÌÐòÖУ¬Ê¹ÓþßÓÐÒ»ÖµıêµãºÍ½á¹¹µÄÑùʽÀ´¹¹Ôì×¢ÊÍ¡£Èç¹ûÔÚÆäËûÏîÄ¿×é·¢ÏÖËûÃǵÄ×¢Ê͹淶ÓëÕâ·ÝÎĵµ²»Í¬£¬°´ÕÕËûÃǵĹ淶д´úÂ룬²»ÒªÊÔͼÔڼȳɵĹ淶ϵͳÖÐÒýÈëеĹ淶¡£
2¡¢ ×¢Ê͵ļò½à
ÄÚÈÝÒª¼òµ¥¡¢Ã÷ÁË¡¢º¬Òå׼ȷ£¬·ÀÖ¹×¢Ê͵ĶàÒåÐÔ£¬´íÎóµÄ×¢ÊͲ»µ«ÎÞÒæ·´¶øÓÐ ......
ÔÚJavaÖУ¬µ±Ò»¸ö¶ÔÏó±»´´½¨Ê±£¬³ÉÔ±±äÁ¿µÄ³õʼ»¯¼°¹¹Ôì·½·¨µÄµ÷ÓÃ×ñÑÒÔÏÂ˳Ðò£º
1. ½«·ÖÅä¸ø¶ÔÏóµÄ´æ´¢¿Õ¼ä³õʼ»¯³É¶þ½øÖƵÄÁã¡£
2. µ÷ÓÃËùÓлùÀàµÄ¹¹Ôì·½·¨¡£Õâ¸ö²½Öè»á²»¶ÏµØ·´¸´µÝ¹éÏÂÈ¥£¬Ê×ÏÈÊǹ¹ÔìÕâÖÖ²ã´Î½á¹¹µÄ¸ù£¬È»ºóÊÇÏÂÒ»²ã×ÓÀ࣬µÈµÈ£¬Ö±µ½×îµ×²ãµÄ×ÓÀà¡£
3. °´ÕÕÉùÃ÷µÄ˳Ðòµ÷ÓóÉÔ±µÄ³õʼ»¯·½·¨¡£
4. µ÷ ......
Java2ºËÐļ¼ÊõµÚÆß°æÖÐÎÄ°æµÚ¶þ¾í
µÚ600Ò³£¬¾¯¸æ´¦ÕâÑù˵£º
Èç¹û½«jar·ÅÈëjre/lib/extĿ¼ÖУ¬²¢ÇÒÔÚËüµÄÀàÖÐÓÐÒ»¸öÀàÐèÒªµ÷ÓÃϵͳÀà»òÕßÀ©Õ¹À࣬ÄÇô¾Í»áÓöµ½Âé·³¡£À©Õ¹Àà¼ÓÔØÆ÷²¢²»Ê¹ÓÃÀà·¾¶¡£
¸Õ¶Áµ½ÕâÀïÊ®·Ö²»½â£¬ÎªÊ²Ã´Óõ½ÏµÍ³Àà»òÀ©Õ¹Àà»á·¢Éú´íÎ󣿲¢ÇÒÒ»¸öÀàÔõô¿ÉÄܲ»»áÓõ½ÏµÍ³ÀࣿÓÚÊÇ£¬ÕÒµ½Ó¢ÎÄ°æÔÎÄÈ ......
ÔÚÕâÀï×ܽáһϳéÈ¡word,pdfµÄ¼¸ÖÖ·½·¨¡£
ºÜ¶àÈËÓÃjava½øÐÐÎĵµ²Ù×÷ʱ¾³£»áÓöµ½Ò»¸öÎÊÌ⣬¾ÍÊÇÈçºÎ»ñµÃword£¬excel£¬pdfµÈÎĵµµÄÄÚÈÝ£¿ÎÒÑо¿ÁËһϣ¬ÔÚÕâÀï×ܽáһϳéÈ¡word,pdfµÄ¼¸ÖÖ·½·¨¡£
1. ÓÃjacob
ÆäʵjacobÊÇÒ»¸öbridage£¬Á¬½ÓjavaºÍcom»òÕßwin32º¯ÊýµÄÒ»¸öÖмä¼þ£¬jacob²¢²» ......
Òì³£ÁÐ±í£º
1. java.lang.nullpointerexception
2. Java.lang.classnotfoundexception
3. Java.lang.arithmeticexception
4. Java.lang.arrayindexoutofboundsexception
5. Java.lang.illegalargumentexception
6. java.lang.illegalaccessexception
1. java.lang.nullpoi ......