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

JavaÖÐReadOnlyµÄ¼¯ºÏ

½ñÌìÔÚCSDN¹äÂÛ̳µÄʱºòÎÞÒâÖз¢ÏÖÓÐÈËÎÊÔÚJavaÖÐÊÇ·ñÓÐReadOnly²Ù×÷·½Ê½µÄ¼¯ºÏ£¬ËµÊµ»°ÔÚÒÔÍù¿ª·¢Öи÷ÖÖ¼¯ºÏÓõĺܶ࣬µ«ÊÇÕâ¸öÎÊÌ⻹ÕæûÓÐ×¢Òâ¹ý¡£È¥JavaµÄ¹Ù·½APIÎĵµ²éÁËһϣ¬CollectionsÖл¹ÕæÓÐÕâô¸ö·½·¨Ö§³Ö£¬·½·¨Ô­ÐÍÈçÏ£º
unmodifiableCollection
public static <T> Collection<T> unmodifiableCollection(Collection<? extends T> c)
·µ»ØÖ¸¶¨ collection µÄ²»¿ÉÐÞ¸ÄÊÓͼ¡£´Ë·½·¨ÔÊÐíÄ£¿éΪÓû§Ìṩ¶ÔÄÚ²¿ collection µÄ“Ö»¶Á”·ÃÎÊ¡£ÔÚ·µ»ØµÄ collection ÉÏÖ´ÐеIJéѯ²Ù×÷½«“¶ÁÍê”Ö¸¶¨µÄ collection¡£ÊÔͼÐ޸ķµ»ØµÄ collection£¨²»¹ÜÊÇÖ±½ÓÐ޸Ļ¹ÊÇͨ¹ýÆäµü´úÆ÷½øÐÐÐ޸ģ©½«µ¼ÖÂÅ׳ö UnsupportedOperationException¡£
·µ»ØµÄ collection ²»»á ½« hashCode ºÍ equals ²Ù×÷´«µÝ¸øµ×²ãʵÏÖ collection£¬µ«ÕâÒÀÀµÓÚ Object µÄ equals ºÍ hashCode ·½·¨¡£ÔڵײãʵÏÖ collection ÊÇÒ»¸ö set »òÊÇÒ»¸öÁбíµÄÇé¿öÏ£¬ÓбØÒª×ñÊØÕâЩ²Ù×÷µÄЭ¶¨¡£
Èç¹ûÖ¸¶¨ collection ÊÇ¿ÉÐòÁл¯µÄ£¬Ôò·µ»ØµÄ collection Ò²½«ÊÇ¿ÉÐòÁл¯µÄ¡£
²ÎÊý£º c - ½«ÎªÆä·µ»ØÒ»¸ö²»¿ÉÐÞ¸ÄÊÓͼµÄ collection¡£ ·µ»Ø£º Ö¸¶¨ collection µÄ²»¿ÉÐÞ¸ÄÊÓͼ¡£
¿´À´¾­³£¹äCSDNÂÛ̳»¹ÊÇͦÓÐÊÕ»ñµÄ¡£^_^


Ïà¹ØÎĵµ£º

java¶¯Ì¬´úÀí

¶¨Ò嶯̬´úÀíÀàDynamicProxy
package com.zte.adc.common;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class DynamicProxy implements InvocationHandler {
 private Object object;
 // °ó¶¨¹Øϵ£¬Ò²¾ÍÊǹØÁªµ½Äĸö½Ó¿Ú£¨Óë ......

JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾


 
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍ ......

javaÖг£ÓÃÀàÐÍÁªÏµÓëÇø±ð

 LinkedListÄÚ²¿ÒÔÁ´±íÐÎʽ´æ´¢Êý¾Ý 
 ArrayListÄÚ²¿ÒÔÊý×éÐÎʽ´æ´¢Êý¾Ý¡£ 
 VectorͬArrayList£¬²»¹ýËüÓëArrayList±È½ÏÆðÀ´ÊÇthread-safeµÄ¡£ 
 HashtableÊǼ̳ÐÁËDictionary£¬ÊÇḬ̈߳²È«µÄ¡£HashMapʵÏÖÁËMap½Ó¿Ú£¬²»ÊÇḬ̈߳²È«µÄ¡£ 
 ÈçºÎ±£Ö¤Ḭ̈߳²È«µÄ£¿Ã¿¸öÐÞ¸ÄÈÝÆ ......

¿ìËÙÅÅÐòËã·¨µÄJAVAʵÏÖ

package Utils.Sort;
/**
*¿ìËÙÅÅÐò£¬ÒªÇó´ýÅÅÐòµÄÊý×é±ØÐëʵÏÖComparable½Ó¿Ú
*/
public class QuickSort implements SortStrategy
{
       private static final int CUTOFF = 3;             //µ±ÔªËØÊý´óÓÚ´Ë ......

JavaÈí¼þ¼Ü¹¹Ê¦ËùÒªÐèµÄ¶«Î÷

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéĪ¹ýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£ÎÒÏë¾ÍÎÒ×Ô¼º¶Á¹ýµÄ¼¼ÊõÊé¼®ÖÐÌôÑ¡³öÀ´Ò»Ð©£¬°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
Ò»¡¢Java±à³ÌÈëÃÅÀà
¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄ³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé¼®¶¼Ò»Ñù£¬Õâ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ