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

Java»ù±¾:¼¯ºÏ


Ô­ÎÄ£ºhttp://zhaosoft.javaeye.com/blog/243586
Java
»ù±¾¸ÅÄ¼¯ºÏÀࣨCollection
£© List
/Set/Map  µÄÇø±ðºÍÁªÏµ
Collection
£ºList
¡¢Set
Map£ºHashMap¡¢HashTable
ÈçºÎÔÚËüÃÇÖ®¼äÑ¡Ôñ
Ò»¡¢Array £¬ Arrays
Java
ËùÓГ´æ´¢¼°Ëæ»ú·ÃÎÊÒ»Á¬´®¶ÔÏó”µÄ×ö·¨£¬arrayÊÇ×îÓÐЧÂʵÄÒ»ÖÖ¡£
1¡¢Ð§Âʸߣ¬µ«ÈÝÁ¿¹Ì¶¨ÇÒÎÞ·¨¶¯Ì¬¸Ä±ä¡£
array»¹ÓÐÒ»¸öȱµãÊÇ£¬ÎÞ·¨ÅÐ¶ÏÆäÖÐʵ¼Ê´æÓжàÉÙÔªËØ£¬lengthÖ»ÊǸæËßÎÒÃÇarrayµÄÈÝÁ¿¡£
2¡¢Java
ÖÐÓÐÒ»¸öArraysÀ࣬רÃÅÓÃÀ´²Ù×÷array¡£
    arraysÖÐÓµÓÐÒ»×éstaticº¯Êý£¬equals()£º±È½ÏÁ½¸öarrayÊÇ·ñÏàµÈ¡£arrayÓµÓÐÏàÍ¬ÔªËØ¸öÊý£¬ÇÒËùÓжÔÓ¦ÔªËØÁ½Á½ÏàµÈ¡£
fill()£º½«ÖµÌîÈëarrayÖС£
sort()£ºÓÃÀ´¶Ôarray½øÐÐÅÅÐò¡£
binarySearch()£ºÔÚÅźÃÐòµÄarrayÖÐѰÕÒÔªËØ¡£
System.arraycopy()£ºarrayµÄ¸´ÖÆ¡£
¶þ¡¢Collection
£¬ Map
Èô׫д³ÌÐòʱ²»ÖªµÀ¾¿¾¹ÐèÒª¶àÉÙ¶ÔÏó£¬ÐèÒªÔڿռ䲻×ãʱ×Ô¶¯À©ÔöÈÝÁ¿£¬ÔòÐèҪʹÓÃÈÝÆ÷Àà¿â£¬array²»ÊÊÓá£
1¡¢Collection
ºÍ Map µÄÇø±ð
ÈÝÆ÷ÄÚÿ¸öΪ֮Ëù´æ´¢µÄÔªËØ¸öÊý²»Í¬¡£
Collection
ÀàÐÍÕߣ¬Ã¿¸öλÖÃÖ»ÓÐÒ»¸öÔªËØ¡£
MapÀàÐÍÕߣ¬³ÖÓÐ key-value pair£¬Ïñ¸öСÐÍÊý¾Ý¿â¡£
2¡¢¸÷×ÔÆìϵÄ×ÓÀà¹ØÏµ
Collection
    --List
£º½«ÒÔÌØ¶¨´ÎÐò´æ´¢ÔªËØ¡£ËùÒÔÈ¡³öÀ´µÄ˳Ðò¿ÉÄܺͷÅÈë˳Ðò²»Í¬¡£
          --ArrayList / LinkedList / Vector
    --Set £º ²»Äܺ¬ÓÐÖØ¸´µÄÔªËØ
          --HashSet / TreeSet
Map
    --HashMap
    --HashTable
    --TreeMap
3¡¢ÆäËûÌØÕ÷
* List
£¬Set£¬Map½«³ÖÓжÔÏóÒ»ÂÉÊÓΪObjectÐͱð¡£
* Collection
¡¢List
¡¢Set¡¢Map¶¼Êǽӿڣ¬²»ÄÜʵÀý»¯¡£
   ¼Ì³Ð×ÔËüÃÇµÄ ArrayList, Vector, HashTable, HashMapÊǾßÏóclass£¬ÕâЩ²Å¿É±»ÊµÀý»¯¡£
* vectorÈÝÆ÷È·ÇÐÖªµÀËüËù³ÖÓеĶÔÏóÁ¥ÊôʲôÐͱð¡£vector²»½øÐб߽ç¼ì²é¡£
Èý¡¢Collections
CollectionsÊÇÕë¶Ô¼¯ºÏÀàµÄÒ»¸ö°ïÖúÀà¡£ÌṩÁËһϵÁо²Ì¬·½·¨ÊµÏÖ¶Ô¸÷ÖÖ¼¯ºÏµÄËÑË÷¡¢ÅÅÐò¡¢Ïß³ÌÍêÈ«»¯µÈ²Ù×÷¡£
Ï൱ÓÚ¶ÔArray½øÐÐÀàËÆ²Ù×÷µÄÀà——Arrays¡£
È磬Collections.max(Collection
coll); È¡collÖÐ×î´óµÄÔªËØ¡£
   


Ïà¹ØÎĵµ£º

Java¼ÓÃܽâÃÜ


Eryptogram.java Îļþ£º
package com.cube.limail.util;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
/**
 * ¼ÓÃܽâÃÜÀà
 * @author Ò¶Ê÷Éî
 * @version 1.00 2008Äê01ÔÂ03ÈÕ
 */
 public  class  Eryptogram
{
&nb ......

java Adapterģʽ


2009-08-19
×ªÔØ £º http://yahaitt.javaeye.com/blog/453032
java Adapterģʽ
¹Ø¼ü×Ö: android adapter
ͨ³££¬¿Í»§Àࣨclients of class£©Í¨¹ýÀàµÄ½Ó¿Ú·ÃÎÊËüÌṩµÄ·þÎñ¡£ÓÐʱ£¬ÏÖÓеÄÀࣨexisting class£©¿ÉÒÔÌṩ¿Í»§ÀàµÄ¹¦ÄÜÐèÒª£¬µ«ÊÇËüËùÌṩµÄ½Ó¿Ú²»Ò»¶¨Êǿͻ§ÀàËùÆÚÍûµÄ¡£ÕâÊÇÓÉÓÚÏÖÓеĽӿÚÌ«Ïêϸ»òÕßȱ·¦ ......

JavaScriptºÍJavaµÄÇø±ð

¡¡¡¡ËäÈ»JavaScriptÓëJavaÓнôÃܵÄÁªÏµ£¬µ«È´ÊÇÁ½¸ö¹«Ë¾¿ª·¢µÄ²»Í¬µÄÁ½¸ö²úÆ·¡£JavaÊÇSUN¹«Ë¾ÍƳöµÄÐÂÒ»´úÃæÏò¶ÔÏóµÄ³ÌÐòÉè¼ÆÓïÑÔ£¬ÌرðÊʺÏÓÚInternetÓ¦ÓóÌÐò¿ª·¢£»¶øJavaScriptÊÇNetscape¹«Ë¾µÄ²úÆ·£¬ÆäÄ¿µÄÊÇΪÁËÀ©Õ¹Netscape Navigator¹¦ÄÜ,¶ø¿ª·¢µÄÒ»ÖÖ¿ÉÒÔǶÈëWebÒ³ÃæÖеĻùÓÚ¶ÔÏóºÍʼþÇý¶¯µÄ½âÊÍÐÔÓïÑÔ, ËüµÄǰÉíÊ ......

JavaÁ÷


//Îå¸öÀà
--|fileÀֱࣺ½ÓÓëÎļþ±¾ÉíÓйØÏµ
--|×Ö½ÚÁ÷ OutputStream InputStream 
--|×Ö·ûÁ÷ Writer Reader
´æ·ÅÔÚÎļþÖеͼÊÇ×Ö½Ú¡£¶ø¶Áµ½ÄÚ´æÖвſÉÄܱä³É×Ö·û
´òÓ¡Á÷£ºprintStream/PrintWriter:ÌṩÁ˸÷ÖÖ´òÓ¡¹¦ÄÜ£¬¿ÉÒÔÊä³öÈÎÒâµÄÄÚÈÝ£¬¸ù¾ÝʵÀý»¯¶ÔÏóµÄ²»Í¬
Êä³öµÄλÖÃÒ²²»Í¬

package java11.I ......

java SystemµÄÊôÐÔ²ÎÊý´óÈ«

Properties props=System.getProperties(); //ϵͳÊôÐÔ  
   System.out.println("JavaµÄÔËÐл·¾³°æ±¾£º"+props.getProperty("java.version"));  
   System.out.println("JavaµÄÔËÐл·¾³¹©Ó¦ÉÌ£º"+props.getProperty("java.vendor"));  
   System.out ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ