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();
}
Ïà¹ØÎĵµ£º
ÀàµÄ³õʼ»¯ºÍ¶ÔÏó³õʼ»¯ÊÇ JVM ¹ÜÀíµÄÀàÐÍÉúÃüÖÜÆÚÖзdz£ÖØÒªµÄÁ½¸ö»·½Ú£¬Google ÁËÒ»±éÍøÂ磬ÓйØÀà×°ÔØ»úÖƵÄÎÄÕµ¹ÊDz»ÉÙ£¬È»¶øÀà³õʼ»¯ºÍ¶ÔÏó³õʼ»¯µÄÎÄÕ²¢²»¶à£¬ÌرðÊÇ´Ó×Ö½ÚÂëºÍ JVM ²ã´ÎÀ´·ÖÎöµÄÎÄÕ¸üÊÇÏÊÓÐËù¼û¡£
±¾ÎÄÖ÷Òª¶ÔÀàºÍ¶ÔÏó³õʼ»¯È«¹ý³Ì½øÐзÖÎö£¬Í¨¹ýÒ»¸öʵ¼ÊÎÊÌâÒýÈ룬½«Ô´´úÂëת»»³É JVM ×Ö½ÚÂëºó£¬ ......
´ó¼ÒºÃ,ÎÒÊÇ´«ÖDz¥¿Í2009Äê12ÔÂ20ºÅ³å´Ì°àѧԱ.ÔÚ½ÓÏÂÀ´µÄ¼¸¸öÔÂÀïÎÒ½«ÕæʵµÄ¼Í¼ÔÚ´«ÖDz¥¿ÍµÄѧϰ¾Àú.Ò»ÊǶÔ×Ô¼ºÑ§Ï°µÄ×ܽáºÍ¼Í¼;¶þÊÇÕæʵµÄ·´Ó¦ÔÚ´«ÖDz¥¿Íѧϰ¾ÀúºÍ¹ý³Ì.
ÏȽéÉÜÒ»ÏÂÎÒ×Ô¼º´Ó±ÏÒµµ½´«ÖDz¥¿Í֮ǰÔÚ±±¾©µÄ¾Àú.09Äê±¾¿ ......
ÎÊ£º
²âÊÔÐÂÊÖ£¬¸ù¾Ý×Ô¼ºÀí½âдµÄµ¥Ôª²âÊÔÓÃÀýÄ£°å£¬µ«ÊÇ¿ª·¢ÈËÔ±(JAVAÓïÑÔ)·´Ó³ÄÑÒÔʵʩ£¬²»ÖªµÀµ½µ×Ó¦¸ÃÈçºÎ¸ÄÕý£¬ÎÒÔ±¾µÄÏë·¨ÊÇÒÔÀàΪµ¥Î»£¬ÎªÈ·±£²âÊÔ¸²¸ÇÂÊ£¬ÏÈ»¿ØÖÆÁ÷ͼ£¬ÒÀ¾Ý¶ÀÁ¢Â·¾¶È·¶¨ÊäÈëÊä³ö£¬ÓÐÁËÊäÈëÊä³ö¾ÍËãÒ»¸öÓÃÀýÁË£¬µ«´ó¼Ò·´Ó³£¬Ò»ÀàΪµ¥Î»»¿ØÖÆÁ÷ͼ²»ºÃ»£¬ÀàÖпÉÄÜÉæ¼°ºÜ¶àº¯Ê ......
1. Java±£´æµÄÎļþÃû±ØÐëÓëÀàÃûÒ»Ö£»
2. Èç¹ûÎļþÖÐÖ»ÓÐÒ»¸öÀ࣬ÎļþÃû±ØÐëÓëÀàÃûÒ»Ö£»
3. Ò»¸öJavaÎļþÖÐÖ»ÄÜÓÐÒ»¸öpublicÀࣻ
4. Èç¹ûÎļþÖв»Ö¹Ò»¸öÀ࣬Îļþ ......
synchronized¹Ø¼ü×ÖÔÚ¶àÏß³ÌÖеÄ×÷Óãº
Á½ÖÖÓ÷¨£ºsynchronized ·½·¨ºÍ synchronized ¿é¡£
1. synchronized ·½·¨£ºÍ¨¹ýÔÚ·½·¨ÉùÃ÷ÖмÓÈë synchronized¹Ø¼ü×ÖÀ´ÉùÃ÷ synchronized ·½·¨¡£ÈçÉÏÊöÀý×ÓËùÊö¡£
synchronized ·½·¨¿ØÖƶÔÀà³ÉÔ±±äÁ¿µÄ·ÃÎÊ£ºÃ¿¸öÀàʵÀý¶ÔÏó¶ÔÓ¦Ò»°ÑËø£¬Ã¿¸ö synchronized ·½·¨¶¼±ØÐë»ñµÃµ÷Óø÷½· ......