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

javaѧϰС¼ÇÒ»

                                                                  С¼ÇÒ»
1£¬List£¬Ö÷Òª°üÀ¨ArrayListºÍLinkedList,Õâ¸ölistºÜÏñÊý¾Ý½á¹¹ÀïÃæµÄÏßÐÔ±í£¬ÏßÐÔ±íÖ÷ÒªµÄÁ½ÖÖʵÏÖ·½·¨Ò»¸ö¾ÍÊÇÊý×飬ÁíÒ»¸ö¾ÍÊÇÁ´½Ó±í¡£ArrayListÖ÷ÒªµÄ·½·¨°üÀ¨add(),¸úget().LinkedListÖ÷ÒªµÄ·½·¨ÊÇaddFirst(),getFirst(),addLast(),getLast().
2£¬Set ¹ËÃû˼Ò壬¼¯ºÏµÄÒâ˼£¬¼¯ºÏÓиöÌØÕ÷¾ÍÊDz»´æÔÚÖظ´µÄÔªËØ£¬ÕâÀïÒ²ÊÇ£¬¶ÔÓÚijһ¸öʵÀý£¨Object£©£¬Ö»ÄÜ´æÔÚÒ»¸öÒýÓÃÔÚSetÀï¡£¼¯ºÏÖ÷ÒªµÄ²Ù×÷Ò²ÊÇadd(),remove(),¼ì²éij¸öobjectÊÇ·ñÔÚ¼¯ºÏÀïÓÃcontains()·½·¨¡£
3£¬Map ¿ÉÒÔÀí½âΪӳÉ䣬´ÓKey µ½ValueµÄÓ³É䣬һ¶ÔÒ»£¬keySet()µÃµ½KeyµÄ¼¯ºÏ£¬values()µÃµ½ValueµÄ¼¯ºÏ£¬³£Ó÷½·¨ÊÇadd(Object Key,Object Value),Value getKey(Obect Key),MapÒ»°ãÓÃHashMap£¬¸úLinkerMap£¬Ç°ÕßËٶȿ죬ºóÕß¿ÉÒÔ±£Ö¤´æ´¢Ë³Ðò°´ÕÕÊäÈë˳Ðò¡£»¹ÓиöTreeMap£¬¾Ý˵¿ÉÒÔ·µ»Ø×ÓÊ÷£¬Ã»²âÊÔ¡£MapÖ÷Ҫǿ´óÔÚ¿ÉÒÔÓÃa ObjectÀ´associate with another object.¶ÔÓÚArrayÀ´Ëµ£¬ÊÇϱê(index)À´¶ÔӦÿһ¸ö¶ÔÏ󣬶øMap¿ÉÒÔÓöÔÏóÀ´¶ÔÓ¦ÁíÍâÒ»¸ö¶ÔÏ󣬱ÈÈçÈ˶ÔÓ¦×Ô¼ºÑøµÄ³èÎ¶þÕ߶¼ÊǶÔÏó£¬ÓÃArrayµÄ»°£¬¿ÉÒÔÓÃ2XNÊý×éÀ´Ä£Ä⣬µ«ÊÇÓÃMap¿ÉÒÔÖ±½Ó°ìµ½£¬¶øÇÒ¿ÉÒÔ°ìµ½Ò»¸öÈ˶ÔÓ¦¶àÖ»³èÎï¡£eg,Map<Person,List<Pets>> 
4£¬¶ÔÓÚÒÔÉϵÄCollectionÈç¹ûÉùÃ÷ʱûÓй涨Ìض¨µÄÀàÐÍ£¬ÀíÂÛÉÏ¿ÉÒÔ·ÅÈëÈÎÒâ¶ÔÏ󣬿ÉÊǵ±È¡³öʱÐèҪǿÖÆÀàÐÍת»¯³É¶ÔÓ¦µÄÀàÐͲÅÄÜʹÓÃ.
5£¬ÆäʵÕâЩÈÝÆ÷´æ·ÅµÄ¶¼ÊÇreference of objects.
6£¬¶ÔÓÚCollection£¬¶¼¿ÉÒÔʹÓÃiterator(),Óеü´úÆ÷µÄÒâ˼£¬¾ÍÊÇ°´ÕÕ˳ÐòÒ»¸öÒ»¸ö¶Á³öÀ´£¬Ö÷Òª·½·¨ÊÇhasNext(),ºÍNext(),È¡³öÀ´µÄObjectÐèÒªcast³É¶ÔÓ¦µÄÀàÐͲſÉÒÔʹÓá£Map¿ÉÒÔ³éÈ¡³öKey¼¯ºÏ¸úvalue¼¯ºÏ£¬È»ºóÔÙʹÓÃiterator().
7£¬ArrayºÜÇ¿´ó£¬µ«ÊÇÐèÒªÊÂÏȹ涨¹Ì¶¨µÄ´óС¼°ÀàÐÍ¡£¶ø¶ÔÓÚÒÔÉϵÄContainers²»ÐèÒª£¬ÐèÒªµÄÊÇÈ¡³öÓÃʱÐèҪת»¯Îª¶ÔÓ¦µÄÀàÐÍ¡£


Ïà¹ØÎĵµ£º

¡¶JAVAºËÐļ¼Êõ¡·¹Ûºó¸Ð


JAVAºËÐļ¼Êõ¹Ûºó¸Ð
  ÕâÖÜ´ó¼Ò¶¼»ù±¾ÉÏÂòÁËÒ»±¾¡¶JAVAºËÐļ¼Êõ¡·À´¿´£¬ËäÈ»ÎÒµÄÊéÏÂÖܲÅÄÜÄõ½£¬µ«ÊÇÎÒ»¹ÊÇ·­ÁËϱðÈ˵ģ¬´óÖÂÁ˽âÁËÒ»ÏÂÀïÃæµÄÄÚÈÝ¡£ÒÔϾÍÊÇÎÒ´Ö²ÚµÄÕûÀí¡£
JAVA²¢²»Ö»ÊÇÒ»ÖÖÓïÑÔ£¬¶øÊÇÒ»¸öÍêÕûµÄƽ̨£¬ÓÐÒ»¸öÅÓ´óµÄ¿â£¬ÆäÖаüº¬ºÜ¶à¿ÉÒÔÖØÓõĴúÂëºÍÒ»¸öÌṩÖîÈ簲ȫÐÔ£¬¿ç²Ù×÷ϵͳµÄ¿ÉÒÆ ......

java¿ò¼ÜѧϰÌå»á

      ×î½üÔÚѧϰjavaµÄ¿ò¼Ü£¬¼ÓÉîÁ˶ÔjavaһЩÉè¼ÆģʽµÄÀí½â£¬ÀýÈçÄ£°å·½·¨Ä£Ê½¡¢²ßÂÔģʽ¡¢´úÀíģʽºÍ¶¯Ì¬´úÀíģʽ£¬·¢ÏÖѧϰÀí½âservletºÍjspºóºÜÈÝÒ×¾Íѧ»áÁËstruts£¬Ñ§Ï°jdbcºó±È½ÏÈÝÒ×Àí½âhibernate£¬±¾ÈË»¹Ã»¿ªÊ¼Ñ§Ï°spring¡£
      ¶Ôstruts¿ò¼ÜµÄÀí½â£ºÖ÷ÒªÊ ......

JAVA¶ÁÈ¡txtÎļþ

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
/**
* @author dengshaohua
*/
public class ReadPhone {
/**
* ¶ÁÈ¡Êý¾Ý
*/
public void ReadData(){
try {
FileReader read = new File ......

javaÖзÃÎÊmemcache

ÓÃspyºÍmemcached for  javaÁ½ÖÖ·½Ê½¶Ômemcache½øÐвÙ×÷
Ò»¡¢spy
package com.test.memcache;
import java.net.InetSocketAddress;
import java.util.concurrent.Future;
import net.spy.memcached.MemcachedClient;
/**
 * ±¾ÀàÓõİüÊÇmemcached-2.4.1.jar
 *  ÏÂÔصØÖ·£º http://code.googl ......

JAVA ¾²Ì¬±äÁ¿Ó뾲̬·½·¨

javaÖо²Ì¬±äÁ¿ºÍ¾²Ì¬·½·¨·Ö±ðÓÐʲôÌص㣿
ÐüÉÍ·Ö£º0 - ½â¾öʱ¼ä£º2006-4-10 10:28

ÌáÎÊÕߣº vv_clear - ¶þ¼¶
×î¼Ñ´ð°¸
ΪʲôÎÊÁËÁ½´Î£¿ÔÙÌùÉÏÁíһƪ
Thinking:JavaÖÐstaticÓ÷¨- -
Tag£º Thinking:JavaÖÐs
Ò»¡¢static
ÇëÏÈ¿´ÏÂÃæÕâ¶Î³ÌÐò£º
public class ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ