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

JavaÈçºÎ±éÀúMapµÄËùÓеÄÔªËØ

Map map = new HashMap(); 
Iterator it = map.entrySet().iterator(); 
while (it.hasNext()) { 
Map.Entry entry = (Map.Entry) it.next(); 
Object key = entry.getKey(); 
Object value = entry.getValue(); 



Ïà¹ØÎĵµ£º

½âÎöJavaÀàºÍ¶ÔÏóµÄ³õʼ»¯¹ý³Ì

ÀàµÄ³õʼ»¯ºÍ¶ÔÏó³õʼ»¯ÊÇ JVM ¹ÜÀíµÄÀàÐÍÉúÃüÖÜÆÚÖзdz£ÖØÒªµÄÁ½¸ö»·½Ú£¬Google ÁËÒ»±éÍøÂ磬ÓйØÀà×°ÔØ»úÖƵÄÎÄÕµ¹ÊDz»ÉÙ£¬È»¶øÀà³õʼ»¯ºÍ¶ÔÏó³õʼ»¯µÄÎÄÕ²¢²»¶à£¬ÌرðÊÇ´Ó×Ö½ÚÂëºÍ JVM ²ã´ÎÀ´·ÖÎöµÄÎÄÕ¸üÊÇÏÊÓÐËù¼û¡£
±¾ÎÄÖ÷Òª¶ÔÀàºÍ¶ÔÏó³õʼ»¯È«¹ý³Ì½øÐзÖÎö£¬Í¨¹ýÒ»¸öʵ¼ÊÎÊÌâÒýÈ룬½«Ô´´úÂëת»»³É JVM ×Ö½ÚÂëºó£¬ ......

JavaÅàѵ,ÎÒΪʲôѡÔñ´«ÖDz¥¿Í

       ´ó¼ÒºÃ,ÎÒÊÇ´«ÖDz¥¿Í2009Äê12ÔÂ20ºÅ³å´Ì°àѧԱ.ÔÚ½ÓÏÂÀ´µÄ¼¸¸öÔÂÀïÎÒ½«ÕæʵµÄ¼Í¼ÔÚ´«ÖDz¥¿ÍµÄѧϰ¾­Àú.Ò»ÊǶÔ×Ô¼ºÑ§Ï°µÄ×ܽáºÍ¼Í¼;¶þÊÇÕæʵµÄ·´Ó¦ÔÚ´«ÖDz¥¿Íѧϰ¾­ÀúºÍ¹ý³Ì.
       ÏȽéÉÜÒ»ÏÂÎÒ×Ô¼º´Ó±ÏÒµµ½´«ÖDz¥¿Í֮ǰÔÚ±±¾©µÄ¾­Àú.09Äê±¾¿ ......

³õ³¢µ¥Ôª²âÊÔ£¨JAVA£©£¬ÈçºÎÖƶ¨ÇÐʵ¿ÉÐеļƻ®£¿

ÎÊ£º
    ²âÊÔÐÂÊÖ£¬¸ù¾Ý×Ô¼ºÀí½âдµÄµ¥Ôª²âÊÔÓÃÀýÄ£°å£¬µ«ÊÇ¿ª·¢ÈËÔ±(JAVAÓïÑÔ)·´Ó³ÄÑÒÔʵʩ£¬²»ÖªµÀµ½µ×Ó¦¸ÃÈçºÎ¸ÄÕý£¬ÎÒÔ­±¾µÄÏë·¨ÊÇÒÔÀàΪµ¥Î»£¬ÎªÈ·±£²âÊÔ¸²¸ÇÂÊ£¬ÏÈ»­¿ØÖÆÁ÷ͼ£¬ÒÀ¾Ý¶ÀÁ¢Â·¾¶È·¶¨ÊäÈëÊä³ö£¬ÓÐÁËÊäÈëÊä³ö¾ÍËãÒ»¸öÓÃÀýÁË£¬µ«´ó¼Ò·´Ó³£¬Ò»ÀàΪµ¥Î»»­¿ØÖÆÁ÷ͼ²»ºÃ»­£¬ÀàÖпÉÄÜÉæ¼°ºÜ¶àº¯Ê ......

Java ÎļþÃûÓëÀàÃûµÄÒ»ÖÂÐÔ


1.       Java±£´æµÄÎļþÃû±ØÐëÓëÀàÃûÒ»Ö£»
2.       Èç¹ûÎļþÖÐÖ»ÓÐÒ»¸öÀ࣬ÎļþÃû±ØÐëÓëÀàÃûÒ»Ö£»
3.       Ò»¸öJavaÎļþÖÐÖ»ÄÜÓÐÒ»¸öpublicÀࣻ
4.       Èç¹ûÎļþÖв»Ö¹Ò»¸öÀ࣬Îļþ ......

Java synchronizedÓ÷¨

synchronized¹Ø¼ü×ÖÔÚ¶àÏß³ÌÖеÄ×÷Óãº
Á½ÖÖÓ÷¨£ºsynchronized ·½·¨ºÍ synchronized ¿é¡£
1. synchronized ·½·¨£ºÍ¨¹ýÔÚ·½·¨ÉùÃ÷ÖмÓÈë synchronized¹Ø¼ü×ÖÀ´ÉùÃ÷ synchronized ·½·¨¡£ÈçÉÏÊöÀý×ÓËùÊö¡£
synchronized ·½·¨¿ØÖƶÔÀà³ÉÔ±±äÁ¿µÄ·ÃÎÊ£ºÃ¿¸öÀàʵÀý¶ÔÏó¶ÔÓ¦Ò»°ÑËø£¬Ã¿¸ö synchronized ·½·¨¶¼±ØÐë»ñµÃµ÷Óø÷½· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ