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();
}
Ïà¹ØÎĵµ£º
http://en.wikipedia.org/wiki/List_of_Java_keywords
http://java.sun.com/docs/books/tutorial/java/index.html
extends,implements,final,static,synchronized,super
Nested Classes
class OuterClass {
...
class NestedClass {
&nb ......
11¡¢HashMapºÍHashtableµÄÇø±ð¡£
HashMapÊÇHashtableµÄÇáÁ¿¼¶ÊµÏÖ£¨·ÇḬ̈߳²È«µÄʵÏÖ£©£¬ËûÃǶ¼Íê³ÉÁËMap½Ó¿Ú£¬Ö÷ÒªÇø±ðÔÚÓÚHashMapÔÊÐí¿Õ£¨null£©¼üÖµ£¨key£©,ÓÉÓÚ·ÇḬ̈߳²È«£¬Ð§ÂÊÉÏ¿ÉÄܸßÓÚHashtable¡£
HashMapÔÊÐí½«null×÷Ϊһ¸öentryµÄkey»òÕßvalue£¬¶øHashtable²»ÔÊÐí¡£
HashMap°ÑHashtableµÄ ......
1. Java±£´æµÄÎļþÃû±ØÐëÓëÀàÃûÒ»Ö£»
2. Èç¹ûÎļþÖÐÖ»ÓÐÒ»¸öÀ࣬ÎļþÃû±ØÐëÓëÀàÃûÒ»Ö£»
3. Ò»¸öJavaÎļþÖÐÖ»ÄÜÓÐÒ»¸öpublicÀࣻ
4. Èç¹ûÎļþÖв»Ö¹Ò»¸öÀ࣬Îļþ ......
synchronized¹Ø¼ü×ÖÔÚ¶àÏß³ÌÖеÄ×÷Óãº
Á½ÖÖÓ÷¨£ºsynchronized ·½·¨ºÍ synchronized ¿é¡£
1. synchronized ·½·¨£ºÍ¨¹ýÔÚ·½·¨ÉùÃ÷ÖмÓÈë synchronized¹Ø¼ü×ÖÀ´ÉùÃ÷ synchronized ·½·¨¡£ÈçÉÏÊöÀý×ÓËùÊö¡£
synchronized ·½·¨¿ØÖƶÔÀà³ÉÔ±±äÁ¿µÄ·ÃÎÊ£ºÃ¿¸öÀàʵÀý¶ÔÏó¶ÔÓ¦Ò»°ÑËø£¬Ã¿¸ö synchronized ·½·¨¶¼±ØÐë»ñµÃµ÷Óø÷½· ......