¹ØÓÚ Java ¶ÔÏóÐòÁл¯Äú²»ÖªµÀµÄ 5 ¼þÊÂ
ÊýÄêÇ°£¬µ±ºÍÒ»¸öÈí¼þÍŶÓÒ»ÆðÓà Java ÓïÑÔ±àдһ¸öÓ¦ÓóÌÐòʱ£¬ÎÒÌå»áµ½±ÈÒ»°ã³ÌÐòÔ±¶àÖªµÀÒ»µã¹ØÓÚ Java ¶ÔÏóÐòÁл¯µÄ֪ʶËù´øÀ´µÄºÃ´¦¡£
´óÔ¼Ò»ÄêÇ°£¬Ò»¸ö¸ºÔð¹ÜÀíÓ¦ÓóÌÐòËùÓÐÓû§ÉèÖõĿª·¢ÈËÔ±£¬¾ö¶¨½«Óû§ÉèÖô洢ÔÚÒ»¸ö Hashtable ÖУ¬È»ºó½«Õâ¸ö Hashtable ÐòÁл¯µ½´ÅÅÌ£¬ÒÔ±ã³Ö¾Ã»¯¡£µ±Óû§¸ü¸ÄÉèÖÃʱ£¬±ãÖØн« Hashtable дµ½´ÅÅÌ¡£
ÕâÊÇÒ»¸öÓÅÑŵġ¢¿ª·ÅʽµÄÉèÖÃϵͳ£¬µ«ÊÇ£¬µ±ÍŶӾö¶¨´Ó Hashtable ǨÒƵ½ Java Collections ¿âÖÐµÄ HashMap ʱ£¬Õâ¸öϵͳ±ãÃæÁÙ±ÀÀ£¡£
Hashtable ºÍ HashMap ÔÚ´ÅÅÌÉϵĸñʽÊDz»Ïàͬ¡¢²»¼æÈݵġ£³ý·Ç¶Ôÿ¸ö³Ö¾Ã»¯µÄÓû§ÉèÖÃÔËÐÐijÖÖÀàÐ͵ÄÊý¾Ýת»»ÊµÓóÌÐò£¨¼«ÆäÅÓ´óµÄÈÎÎñ£©£¬·ñÔòÒÔºóËƺõÖ»ÄÜÒ»Ö±Óà Hashtable ×÷ΪӦÓóÌÐòµÄ´æ´¢¸ñʽ¡£
ÍŶӸе½ÏÝÈ뽩¾Ö£¬µ«ÕâÖ»ÊÇÒòΪËûÃDz»ÖªµÀ¹ØÓÚ Java ÐòÁл¯µÄÒ»¸öÖØÒªÊÂʵ£ºJava ÐòÁл¯ÔÊÐíËæ×Åʱ¼äµÄÍÆÒƶø¸Ä±äÀàÐÍ¡£µ±ÎÒÏòËûÃÇչʾÈçºÎ×Ô¶¯½øÐÐÐòÁл¯Ìæ»»ºó£¬ËûÃÇÖÕÓÚ°´¼Æ»®Íê³ÉÁËÏò HashMap µÄת±ä¡£
±¾ÎÄÊDZ¾ÏµÁеĵÚһƪÎÄÕ£¬Õâ¸öϵÁÐרÃŽÒʾ¹ØÓÚ Java ƽ̨µÄһЩÓÐÓõÄС֪ʶ — ÕâЩС֪ʶ²»Ò×Àí½â£¬µ«¶ÔÓÚ½â¾ö Java ±à³ÌÌôÕ½³ÙÔçÓÐÓá£
½« Java ¶ÔÏóÐòÁл¯ API ×÷Ϊ¿ª¶ËÊÇÒ»¸ö²»´íµÄÑ¡Ôñ£¬ÒòΪËü´ÓÒ»¿ªÊ¼¾Í´æÔÚÓÚ JDK 1.1 ÖС£±¾ÎĽéÉܵĹØÓÚÐòÁл¯µÄ 5 ¼þÊÂÇ齫˵·þÄúÖØÐÂÉóÊÓÄÇЩ±ê×¼ Java API¡£
Java ÐòÁл¯¼ò½é
Java ¶ÔÏóÐòÁл¯ÊÇ JDK 1.1 ÖÐÒýÈëµÄÒ»×鿪´´ÐÔÌØÐÔÖ®Ò»£¬ÓÃÓÚ×÷ΪһÖÖ½« Java ¶ÔÏóµÄ״̬ת»»Îª×Ö½ÚÊý×飬ÒÔ±ã´æ´¢»ò´«ÊäµÄ»úÖÆ£¬ÒÔºó£¬ÈÔ¿ÉÒÔ½«×Ö½ÚÊý×éת»»»Ø Java ¶ÔÏóÔÓеÄ״̬¡£
ʵ¼ÊÉÏ£¬ÐòÁл¯µÄ˼ÏëÊÇ “¶³½á” ¶ÔÏó״̬£¬´«Êä¶ÔÏó״̬£¨Ð´µ½´ÅÅÌ¡¢Í¨¹ýÍøÂç´«ÊäµÈµÈ£©£¬È»ºó “½â¶³” ״̬£¬ÖØлñµÃ¿ÉÓÃµÄ Java ¶ÔÏó¡£ËùÓÐÕâЩÊÂÇéµÄ·¢ÉúÓеãÏñÊÇħÊõ£¬ÕâÒª¹é¹¦ÓÚ ObjectInputStream/ObjectOutputStream Àà¡¢ÍêÈ«±£ÕæµÄÔªÊý¾ÝÒÔ¼°³ÌÐòÔ±Ô¸ÒâÓà Serializable ±êʶ½Ó¿Ú±ê¼ÇËûÃǵÄÀ࣬´Ó¶ø “²ÎÓë” Õâ¸ö¹ý³Ì¡£
Çåµ¥ 1 ÏÔʾһ¸öʵÏÖ Serializable µÄ Person Àà¡£
Çåµ¥ 1. Serializable Person
package com.tedneward;
public class Person
implements java.io.Serializable
{
public Person(String fn, String ln, int a)
{
this.firstName = fn; this.lastName = ln; this.age = a;
}
public String getFirstName() { return firstN
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
package floatt;
public class Go {
public static int i = 0;
public static void main(String[] args){
calc("", 5);
System.out.println("×ܹ²ÓÐ"+i+"ÖÖ×ß·¨~");
}
//ÉÏÂ¥ÌÝÿ´ÎÖ»ÐèÒ»²½»òÕßÁ½²½£¬ÓжàÉÙ×ß·¨
public static void calc(String lo ......
JavaÊý¾ÝÀàÐÍÓëת»»
JavaÊý¾ÝÀàÐÍ·ÖΪÈý´óÀà
²¼¶ûÐÍ£¬×Ö·ûÐÍ(char)£¬ÊýÖµÐÍ(ÕûÊý,¸¡µãÐÍ)
ÕûÊýÀàÐÍÓУºbyte(8bits)¡¢short(16bits)¡¢int(32bits)¡¢long(64bits)¡¢
¸¡µãÀàÐÍÓУºµ¥¾«¶È£¨32bits float£©¡¢Ë«¾«¶È£¨64bits double£©
booleanÀàÐͱäÁ¿µÄÈ¡ÖµÓУºture¡¢false
charÊý¾ÝÀàÐÍÓУºunicode×Ö·û,16λ
Êý¾ÝÀàÐÍת» ......
×î½üһֱдjava ²Ù×÷¶ÌÐÅèµÄapp.
ºóÀ´google µ½smslib £¬²»´íµÄopensource.libraray.
ÔÚÍøÉÏҲûÕÒµ½ÖÐÎĵģ¬
ÓÚÊÇ·ÒëµÄÒ»ÏÂsmslib µÄ¼ò½é
Smslib ÊÇÒ»¸öÔÊÐíÄãͨ¹ýÒ»¸ögsm Modem »òÕßÊÇÒ»¸ö gsm phoneÊÕ·¢¶ÌÐŵÄjava ¿â.(Open source)
Smslib ×îа汾ÊÇ3.4.6.
Smslib v3 ÒÀÈ»±£ÁôÁËһЩÒÔÇ°µÄ¹¦ÄÜ ......