Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java Ïß³Ì×é


Ïß³Ì×é
ÔÚJavaÖÐÿһ¸öÏ̶߳¼¹éÊôÓÚij¸öÏß³Ì×é¹ÜÀíµÄÒ»Ô±£¬ÀýÈçÔÚÖ÷º¯Êýmain()Ö÷¹¤×÷Á÷³ÌÖвúÉúÒ»¸öỊ̈߳¬Ôò²úÉúµÄÏß³ÌÊôÓÚmainÕâ¸öÏß³Ì×é¹ÜÀíµÄÒ»Ô±¡£¼òµ¥µØ˵£¬Ïß³Ì×é¾ÍÊÇÓÉÏß³Ì×é³ÉµÄ¹ÜÀíÏ̵߳ÄÀ࣬Õâ¸öÀàÊÇjava.lang.ThreadGroupÀà¡£
¿ÉÒÔͨ¹ýʹÓÃÈçÏ´úÂë»ñÈ¡´ËÏß³ÌËùÊôÏß³Ì×éµÄÃû³Æ¡£
Thread.currentThread().getThreadGroup().getName();
currentThread()£ºÈ¡µÃµ±Ç°Ï̡߳£
getThreadGroup()£ºÈ¡µÃµ±Ç°Ïß³ÌËùÔÚµÄ×é¡£
getName()£ºÈ¡µÃ×éµÄÃû³Æ¡£
¶¨ÒåÒ»¸öÏß³Ì×飬ͨ¹ýÒÔÏ´úÂë¿ÉÒÔʵÏÖ¡£
ThreadGroup group=new
ThreadGroup("group");
Thread thread=new Thread(group,"the first
thread of group");
ThreadGroupÀàÖеÄijЩ·½·¨£¬¿ÉÒÔ¶ÔÏß³Ì×éÖеÄÏ̲߳úÉú×÷Óá£ÀýÈ磬setMaxPriority()·½·¨¿ÉÒÔÉ趨Ïß³Ì×éÖеÄËùÓÐÏß³ÌÓµÓÐ×î´óµÄÓÅÏÈȨ¡£
ËùÓÐÏ̶߳¼Á¥ÊôÓÚÒ»¸öÏß³Ì×é¡£ÄÇ¿ÉÒÔÊÇÒ»¸öĬÈÏÏß³Ì×飬Òà¿ÉÊÇÒ»¸ö´´½¨Ïß³ÌʱÃ÷È·Ö¸¶¨µÄ×é¡£ÔÚ´´½¨Ö®³õ£¬Ï̱߳»ÏÞÖƵ½Ò»¸ö×éÀ¶øÇÒ²»Äܸı䵽һ¸ö²»Í¬µÄ×顣ÿ¸öÓ¦Óö¼ÖÁÉÙÓÐÒ»¸öÏ̴߳ÓÊôÓÚϵͳÏß³Ì×é¡£Èô´´½¨¶à¸öÏ̶߳ø²»Ö¸¶¨Ò»¸ö×飬ËüÃǾͻá×Ô¶¯¹éÊôÓÚϵͳÏß³Ì×é¡£
¡¡¡¡Ïß³Ì×éÒ²±ØÐë´ÓÊôÓÚÆäËûÏß³Ì×é¡£±ØÐëÔÚ¹¹½¨Æ÷ÀïÖ¸¶¨ÐÂÏß³Ì×é´ÓÊôÓÚÄĸöÏß³Ì×é¡£ÈôÔÚ´´½¨Ò»¸öÏß³Ì×éµÄʱºòûÓÐÖ¸¶¨ËüµÄ¹éÊô£¬ÔòͬÑù»á×Ô¶¯³ÉΪϵͳÏß³Ì×éµÄÒ»ÃûÊôÏ¡£Òò´Ë£¬Ò»¸öÓ¦ÓóÌÐòÖеÄËùÓÐÏß³Ì×é×îÖÕ¶¼»á½«ÏµÍ³Ïß³Ì×é×÷Ϊ×Ô¼ºµÄ“¸¸”¡£
¡¡¡¡Ö®ËùÒÔÒªÌá³ö“Ïß³Ì×锵ĸÅÄºÜÄÑ´Ó×ÖÃæÉÏÕÒµ½Ô­Òò¡£Õâ¶àÉÙΪÎÒÃÇÌÖÂÛµÄÖ÷Ìâ´øÀ´ÁËһЩ»ìÂÒ¡£Ò»°ãµØ˵£¬ÎÒÃÇÈÏΪÊÇÓÉÓÚ“°²È«”»òÕß“±£ÃÜ”·½ÃæµÄÀíÓɲÅʹÓÃÏß³Ì×éµÄ¡£¸ù¾ÝArnoldºÍGoslingµÄ˵·¨£º“Ïß³Ì×éÖеÄÏ߳̿ÉÒÔÐÞ¸Ä×éÄÚµÄÆäËûỊ̈߳¬°üÀ¨ÄÇЩλÓÚ·Ö²ã½á¹¹×îÉî´¦µÄ¡£Ò»¸öÏ̲߳»ÄÜÐÞ¸ÄλÓÚ×Ô¼ºËùÔÚ×é»òÕßÏÂÊô×éÖ®ÍâµÄÈκÎÏ߳̔£¨×¢ÊÍ¢Ù£©¡£È»¶ø£¬ÎÒÃǺÜÄÑÅжϓÐ޸ĔÔÚÕâ¶ùµÄ¾ßÌ庬ÒåÊÇʲô¡£ÏÂÃæÕâ¸öÀý×ÓչʾÁËλÓÚÒ»¸ö“Ò¶×Ó×é”ÄÚµÄÏß³ÌÄÜÐÞ¸ÄËüËùÔÚÏß³Ì×éÊ÷µÄËùÓÐÏ̵߳ÄÓÅÏȼ¶£¬Í¬Ê±»¹ÄÜΪÕâ¸ö“Ê÷”ÄÚµÄËùÓÐÏ̶߳¼µ÷ÓÃÒ»¸ö·½·¨¡£
¡¡¡¡¢Ù£º¡¶The Java Programming
Language¡·µÚ179Ò³¡£¸ÃÊéÓÉArnoldºÍJams
Gosling±àÖø£¬Addison-WesleyÓÚ1996Äê³ö°æ
¡¡¡¡//: TestAccess.java
¡¡¡¡// How threads can access other threads
¡¡¡¡// in a parent thread


Ïà¹ØÎĵµ£º

Java Collection FramWork

jdk
µÄ¼¯ºÏ¿ò¼ÜµÄÖ÷Ìå½á¹¹£º
½Ó¿Ú
¼òÊö
ʵÏÖ
²Ù×÷ÌØÐÔ
³ÉÔ±ÒªÇó
Set
³ÉÔ±²»ÄÜÖظ´
HashSet
ÍⲿÎÞÐòµØ±éÀú³ÉÔ±¡£
³ÉÔ±¿ÉΪÈÎÒâObject×ÓÀàµÄ¶ÔÏ󣬵«Èç
¹û¸²¸ÇÁËequals·½·¨£¬Í¬Ê±×¢ÒâÐÞ¸ÄhashCode·½·¨¡£
TreeSet
ÍⲿÓÐÐòµØ±éÀú³ÉÔ±£»¸½¼ÓʵÏÖÁË
SortedSet, Ö§³Ö×Ó¼¯µÈÒªÇó˳ÐòµÄ²Ù×÷
³ÉÔ±ÒªÇóʵÏÖcaparable ......

Java EE 6£ºEJB 3.1µÄ±ä»¯ÒýÈËעĿ

¡¡¡¡ÄÇôҪ³ÉΪ¼Ü¹¹Ê¦µÄ;¾¶ËƺõÖ»ÓÐÏÖÔÚ½ÏΪÁ÷ÐеÄÈí¼þѧԺºÍ¸öÈË×ÔÎÒÅàÑøÁË¡£¹ØÓÚÈí¼þѧԺÎÒ½Ó´¥¹ý²»ÉÙ£¬Æä×ÚÖ¼¾ø´ó²¿·Ö¶¼ÊÇÔì¾Í(or´òÔì)ÆóÒµ ÐèÒªµÄÈí¼þ¼Ü¹¹Ê¦(or³ÌÐòÔ±orÈ˲Å)¡£½ÌʦÀ´Ô´ÓëÆóÒµ¡¢Ñ§Ô±À´Ô´ÓëÆóÒµ¡¢È˲ÅÊäË͵½ÆóÒµÊÇËûÃÇ°ìѧµÄÊֶΡ£¾¡¹Ü¸÷¸öÈçÓêºó´ºËñ°ã³öÏÖµÄÈí¼þѧԺ¿ÚºÅ²î ²»¶à£¬µ«¿ÖÅ´ó¶àÖ»ÊÇΪÁËȦ ......

ÈçºÎ×Ôѧjava³ÉΪjava¸ßÊÖ

ºÜ¶àÍøÓÑ×ÉѯѧϰJavaÓÐûÓÐʲô½Ý¾¶,ÎÒ˵“ÎÞËû£¬Î¨ÊÖÊì¶û”¡£µ«ÊÇÉÐѧÌÃÔ¸Ò⽫һЩ¾­Ñéд³öÀ´£¬ÒÔ±ãºóÀ´ÕßÉÙ×ßÍä·,°ïÖú±ðÈËÊÇ×î´óµÄ¿ìÀÖÂ
ÒªÏëѧºÃJava£¬Ê×ÏÈÒªÖªµÀJavaµÄ´óÖ·ÖÀà¡£ÎÒÃÇÖªµÀ£¬×Ô´ÓSunÍƳöJavaÒÔÀ´£¬¾ÍÁ¦Í¼Ê¹Ö®ÎÞËù²»°ü£¬ËùÒÔJava·¢Õ¹µ½ÏÖÔÚ£¬°´Ó¦ÓÃÀ´·ÖÖ÷Òª·ÖΪÈý´ó¿é£ºJ2SE,J2MEºÍJ2EE, ......

Éè¼Æģʽ——³éÏ󹤳§ [java]

°æȨËùÓУ¬×ªÔØ×¢Ã÷³ö´¦£¡
תÔØÇëЯ´ø´ËÐÅÏ¢£ºhuangfox
-----------------------------------------------------------------
³éÏ󹤳§ºÍ¹¤³§·½·¨ ¸Õ¿ªÊ¼ºÜÈÝÒ×»ìÏý£¬ÖÁÉÙÎÒÊÇÕâÑùµÄ£¡
²»¹ýËûÃDzúÉúµÄÔµÓÉÀ´¿´£¬»¹ÊÇ¿ÉÒԺúÃÇø·ÖµÄ¡£
1.¹¤³§·½·¨£ºÊÇΪÁ˱ÜÃâÓ¦ÓÃÖ±½ÓʵÀýÀà²ã´Î½á¹¹ÖеľßÌåÀ࣬Ìṩһ¸ö·½·¨¸ù¾ÝÔËÐÐÇé ......

Java¶Ñ.Õ»ºÍ³£Á¿³Ø ±Ê¼Ç

½ñÌ츴ϰÁËÒ»ÏÂÕâЩ֪ʶ£¬Ë³±ã×öÁËϱʼÇ.
1.¼Ä´æÆ÷£º×î¿ìµÄ´æ´¢Çø, ÓɱàÒëÆ÷¸ù¾ÝÐèÇó½øÐзÖÅä,ÎÒÃÇÔÚ³ÌÐòÖÐÎÞ·¨¿ØÖÆ.
2. Õ»£º´æ·Å»ù±¾ÀàÐ͵ıäÁ¿Êý¾ÝºÍ¶ÔÏóµÄÒýÓ㬵«¶ÔÏó±¾Éí²»´æ·ÅÔÚÕ»ÖУ¬¶øÊÇ´æ·ÅÔڶѣ¨new ³öÀ´µÄ¶ÔÏ󣩻òÕß³£Á¿³ØÖУ¨×Ö·û´®³£Á¿¶ÔÏó´æ·ÅÔÚ³£Á¿³ØÖС££©
3. ¶Ñ£º´æ·ÅËùÓÐnew³öÀ´µÄ¶ÔÏó¡£
4. ¾²Ì¬Óò£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ