java¼¯ºÏ¿ò¼Üͼ¼°½éÉÜ
java¼¯ºÏ¿ò¼Üͼ¼°½éÉÜ
ת×Ô:http://hi.baidu.com/%C9%AE_%CC%C6/blog/item/9e2a8b0887008a8ad0581b3d.html
¼ò»¯Í¼£º
Javaƽ̨ÌṩÁËÒ»¸öȫеļ¯ºÏ¿ò¼Ü¡£“¼¯ºÏ¿ò¼Ü”Ö÷ÒªÓÉÒ»×éÓÃÀ´²Ù×÷¶ÔÏóµÄ½Ó¿Ú×é³É¡£²»Í¬½Ó¿ÚÃèÊöÒ»×鲻ͬÊý¾ÝÀàÐÍ¡£
Java 2¼¯ºÏ¿ò¼Üͼ
¼¯ºÏ½Ó¿Ú£º6¸ö½Ó¿Ú£¨¶ÌÐéÏß±íʾ£©£¬±íʾ²»Í¬¼¯ºÏÀàÐÍ£¬ÊǼ¯ºÏ¿ò¼ÜµÄ»ù´¡¡£
³éÏóÀࣺ5¸ö³éÏóÀࣨ³¤ÐéÏß±íʾ£©£¬¶Ô¼¯ºÏ½Ó¿ÚµÄ²¿·ÖʵÏÖ¡£¿ÉÀ©Õ¹Îª×Ô¶¨Ò弯ºÏÀà¡£
ʵÏÖÀࣺ8¸öʵÏÖÀࣨʵÏß±íʾ£©£¬¶Ô½Ó¿ÚµÄ¾ßÌåʵÏÖ¡£
Ôںܴó³Ì¶ÈÉÏ£¬Ò»µ©ÄúÀí½âÁ˽ӿڣ¬Äú¾ÍÀí½âÁË¿ò¼Ü¡£ËäÈ»Äú×ÜÒª´´½¨½Ó¿ÚÌض¨µÄʵÏÖ£¬µ«·ÃÎÊʵ¼Ê¼¯ºÏµÄ·½·¨Ó¦¸ÃÏÞÖÆÔÚ½Ó¿Ú·½·¨µÄʹÓÃÉÏ£»Òò´Ë£¬ÔÊÐíÄú¸ü¸Ä»ù±¾µÄÊý¾Ý½á¹¹¶ø²»±Ø¸Ä±äÆäËü´úÂë¡£
· Collection ½Ó¿ÚÊÇÒ»×éÔÊÐíÖظ´µÄ¶ÔÏó¡£
· Set ½Ó¿Ú¼Ì³Ð Collection£¬µ«²»ÔÊÐíÖظ´£¬Ê¹ÓÃ×Ô¼ºÄÚ²¿µÄÒ»¸öÅÅÁлúÖÆ¡£
· List ½Ó¿Ú¼Ì³Ð Collection£¬ÔÊÐíÖظ´£¬ÒÔÔªËØ°²²åµÄ´ÎÐòÀ´·ÅÖÃÔªËØ£¬²»»áÖØÐÂÅÅÁС£
· Map½Ó¿ÚÊÇÒ»×é³É¶ÔµÄ¼ü£Öµ¶ÔÏ󣬼´Ëù³ÖÓеÄÊÇkey-value pairs¡£MapÖв»ÄÜÓÐÖظ´µÄkey¡£ÓµÓÐ×Ô¼ºµÄÄÚ²¿ÅÅÁлúÖÆ¡£
· ÈÝÆ÷ÖеÄÔªËØÀàÐͶ¼ÎªObject¡£´ÓÈÝÆ÷È¡µÃÔªËØʱ£¬±ØÐë°ÑËüת»»³ÉÔÀ´µÄÀàÐÍ¡£
Java 2¼ò»¯¼¯ºÏ¿ò¼Üͼ
¼¯ºÏ½Ó¿Ú
1.Collection ½Ó¿Ú
ÓÃÓÚ±íʾÈκζÔÏó»òÔªËØ×é¡£ÏëÒª¾¡¿ÉÄÜÒÔ³£¹æ·½Ê½´¦ÀíÒ»×éÔªËØʱ£¬¾ÍʹÓÃÕâÒ»½Ó¿Ú¡£
(1) µ¥ÔªËØÌí¼Ó¡¢É¾³ý²Ù×÷£º
boolean add(Object o):½«¶ÔÏóÌí¼Ó¸ø¼¯ºÏ
boolean remove(Object o): Èç¹û¼¯ºÏÖÐÓÐÓëoÏàÆ¥ÅäµÄ¶ÔÏó£¬Ôòɾ³ý¶ÔÏóo
(2) ²éѯ²Ù×÷£º
int size() £º·µ»Øµ±Ç°¼¯ºÏÖÐÔªËصÄÊýÁ¿
boolean isEmpty() £ºÅжϼ¯ºÏÖÐÊÇ·ñÓÐÈκÎÔªËØ
boolean contains(Object o) £º²éÕÒ¼¯ºÏÖÐÊÇ·ñº¬ÓжÔÏóo
Iterator iterator() £º·µ»ØÒ»¸öµü´úÆ÷£¬ÓÃÀ´·ÃÎʼ¯ºÏÖеĸ÷¸öÔªËØ
(3) ×é²Ù×÷ £º×÷ÓÃÓÚÔªËØ×é»òÕû¸ö¼¯ºÏ
boolean containsAll(Collection c): ²éÕÒ¼¯ºÏÖÐÊÇ·ñº¬Óм¯ºÏc ÖÐËùÓÐÔªËØ
boolean addAll(Collection c) : ½«¼¯ºÏc ÖÐËùÓÐÔªËØÌí¼Ó¸ø¸Ã¼¯ºÏ
void clear(): ɾ³ý¼¯ºÏÖÐËùÓÐÔªËØ
void removeAll(Collection c) : ´Ó¼¯ºÏÖÐɾ³ý¼¯ºÏc ÖеÄËùÓÐÔªËØ
void retainAll(Collection c) : ´Ó¼¯ºÏÖÐɾ³ý¼¯ºÏc Öв»°üº¬µÄÔªËØ
(4) Collectionת»»ÎªObjectÊý×é £º
Object[] toArray() £º·µ»ØÒ»¸öÄÚº¬¼¯ºÏËùÓÐÔªËصÄarray
Object[] toArray(Object[] a) £º·µ»ØÒ»¸
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
¡¡¡¡1¡¢JDK £¨Java Development Kit£© ¡¡¡¡SUNµÄJava²»½öÌáÁËÒ»¸ö·á¸»µÄÓïÑÔºÍÔËÐл·¾³£¬¶øÇÒ»¹ÌáÁËÒ»¸öÃâ·ÑµÄJava¿ª·¢¹¤¾ß¼¯(JDK)¡£¿ª·¢ÈËÔ±ºÍ×îÖÕÓû§¿ÉÒÔÀûÓÃÕâ¸ö¹¤¾ßÀ´¿ª·¢java³ÌÐò¡£ ¡¡¡¡JDK¼òµ¥Ò×ѧ£¬¿ÉÒÔͨ¹ýÈκÎÎı¾±à¼Æ÷£¨È磺Windows ¼Çʱ¾¡¢UltrEdit¡¢Editplus¡¢FrontPageÒÔ¼°dreamweaverµÈ£©±àдJavaÔ´Îļþ£¬ ......
Ò»¡¢PythonÖеÄÎļþ¹ÜÀí
Îļþ¹ÜÀíÊǺܶàÓ¦ÓóÌÐòµÄ»ù±¾¹¦ÄܺÍÖØÒª×é³É²¿·Ö¡£Python¿ÉÒÔʹÎļþ¹ÜÀí¼«Æä¼òµ¥£¬ÌرðÊǺÍÆäËüÓïÑÔÏà¶Ô±È¡£
ÒÔÏ£¬Peyton McCullough½²½âÁËÎļþ¹ÜÀí»ù´¡¡£
½éÉÜ
ÄãÍæ¹ýµÄÓÎϷʹÓÃÎļþÀ´±£´æ´æµµ£»ÄãϵĶ©µ¥±£´æÔÚÎļþÖУ»ºÜÃ÷ÏÔ£¬ÄãÔçÉÏдµÄ±¨¸æÒ²±£´æÔÚÎļþÖС£
¼¸ºõÒÔÈκÎÓïÑÔ±àдµÄÖÚ¶àÓ ......
JAVAÀïµÄPINGÊÇÔÚJDK 1.5ºóÓÃÁËеĺ¯ÊýisreachableȥʵÏÖ,¾ßÌå½éÉÜÈçÏÂ:
InetAddress¶ÔÏóµÄ³£Ó÷½·¨
InetAddressÀàÓкܶà
get
·½·¨£¬ÓÃÀ´»ñÈ¡Ö÷»úÃû£¬Ö÷»úµØÖ·µÈÐÅÏ¢¡£Ö÷ÒªÓУº
byte[] getAddress() ·µ»Ø´Î
InetAddress
¶ÔÏóµÄÔʼ
IP
µØÖ·£¬±£´æΪһ¸ö
byte
Êý×é
String getCanonicalHostName() »ñÈ¡´Ë
I ......