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

javaÖÐmap¼¯ºÏµÄÓ÷¨

1.ÉùÃ÷Ò»¸ömap: Map map = new HashMap();
2.ÏòmapÖзÅÖµ,×¢Ò⣺mapÊÇkey-valueµÄÐÎʽ´æ·ÅµÄ.Èç:
     map.put("sa","dd");
3.´ÓmapÖÐȡֵ:String str = map.get("sa").toString();½á¹ûÊÇ:str = "dd";
4.±éÀúÒ»¸ömap£¬´ÓÖÐÈ¡µÃkey ºÍvalue
JDK1.5
Map m = new HashMap();
for (Object o : map.keySet()) {
map.get(o);
}


JDK1.4
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×Ö·û´®×ª»»³ÉÈÕÆÚ

package com.gaosheng.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class StringToDate {

/**
* ×Ö·û´®×ª»»³ÉÈÕÆÚ
* @param stringdate Ҫת»»µÄ×Ö·û´®(×Ö·û´®¸ñʽ yyyy-MM-dd)
* @return
*/
public Date getStringtoDate(Strin ......

JAVAµÄÄÚÊ¡£¨introspector£©Óë·´É䣨reflection£©

ºÜ¶àÅóÓÑÔÚÉîÈëµÄ½Ó´¥ JAVA ÓïÑÔºó¾Í»á·¢ÏÖÕâÑùÁ½¸ö´Ê£º·´Éä (Reflection) ºÍÄÚÊ¡ (Introspector) £¬¾­³£¸ã²»Çå³þÕâµ½µ×ÊÇÔõô»ØÊ£¬ÔÚʲô³¡ºÏÏÂÓ¦ÓÃÒÔ¼°ÈçºÎʹÓ㿽ñÌì°ÑÕâ¶þÕß·ÅÔÚÒ»Æð½éÉÜ£¬ÒòΪËüÃǶþÕßÊÇÏศÏà³ÉµÄ¡£
·´Éä
<o:p> </o:p>
Ïà¶Ô¶øÑÔ£¬·´Éä±ÈÄÚÊ¡¸üÈÝÒ×Àí½âÒ»µã¡£ÓÃÒ»¾ä±È½Ï°×µÄ»°À´¸ÅÀ ......

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


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

Java ѧϰÔÓ̸

1£® ¹ØÓÚ¶¯Ì¬¼ÓÔØ»úÖÆ??
ѧϰJava±ÈC++¸üÈÝÒ×Àí½âOOPµÄ˼Ï룬±Ï¾¹C++»¹»ìºÏÁ˲»ÉÙÃæÏò¹ý³ÌµÄ³É·Ö¡£ºÜ¶àÈ˶¼Äܱ³³öÀ´JavaÓïÑÔµÄÌØµã£¬ËùνµÄ¶¯Ì¬¼ÓÔØ»úÖÆµÈµÈ¡£µ±È»¸ÅÄîÍùÍùÊÇÏȼÇס¶øºóÏû»¯µÄ£¬¿ÉÓжàÉÙÈËÕæÕýÈ¥Ìå»á¹ý¶¯Ì¬¼ÓÔØµÄ»úÖÆ£¬ÊÔͼȥѰÕÒ¹ýÆäÖеÄϸ½ÚÄØ?  Ìṩ´ó¼ÒÒ»¸ö·½·¨£º
ÔÚÃüÁîÐд°¿ÚÔËÐÐJava³ÌÐòµÄÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ