javaÖÐÏßÐÔ±í£¬Á´±í£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹
ÏßÐÔ±í£¬Á´±í£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹£¬ÔÚ½øÐÐJava¿ª·¢Ê±£¬JDKÒѾΪÎÒÃÇÌṩÁËһϵÁÐÏàÓ¦µÄÀàÀ´ÊµÏÖ»ù±¾µÄÊý¾Ý½á¹¹¡£ÕâЩÀà¾ùÔÚjava.util°üÖС£±¾ÎÄÊÔͼͨ¹ý¼òµ¥µÄÃèÊö£¬Ïò¶ÁÕß²ûÊö¸÷¸öÀàµÄ×÷ÓÃÒÔ¼°ÈçºÎÕýȷʹÓÃÕâЩÀà¡£
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
Map
©ÀHashtable
©ÀHashMap
©¸WeakHashMap
Collection½Ó¿Ú
¡¡¡¡CollectionÊÇ×î»ù±¾µÄ¼¯ºÏ½Ó¿Ú£¬Ò»¸öCollection´ú±íÒ»×éObject£¬¼´CollectionµÄÔªËØ£¨Elements£©¡£Ò»Ð©CollectionÔÊÐíÏàͬµÄÔªËضøÁíһЩ²»ÐС£Ò»Ð©ÄÜÅÅÐò¶øÁíһЩ²»ÐС£Java SDK²»Ìṩֱ½Ó¼Ì³Ð×ÔCollectionµÄÀ࣬Java SDKÌṩµÄÀ඼ÊǼ̳Ð×ÔCollectionµÄ“×Ó½Ó¿Ú”ÈçListºÍSet¡£
¡¡¡¡ËùÓÐʵÏÖCollection½Ó¿ÚµÄÀ඼±ØÐëÌṩÁ½¸ö±ê×¼µÄ¹¹Ô캯Êý£ºÎÞ²ÎÊýµÄ¹¹Ô캯ÊýÓÃÓÚ´´½¨Ò»¸ö¿ÕµÄCollection£¬ÓÐÒ»¸öCollection²ÎÊýµÄ¹¹Ô캯ÊýÓÃÓÚ´´½¨Ò»¸öеÄCollection£¬Õâ¸öеÄCollectionÓë´«ÈëµÄCollectionÓÐÏàͬµÄÔªËØ¡£ºóÒ»¸ö¹¹Ô캯ÊýÔÊÐíÓû§¸´ÖÆÒ»¸öCollection¡£
¡¡¡¡ÈçºÎ±éÀúCollectionÖеÄÿһ¸öÔªËØ£¿²»ÂÛCollectionµÄʵ¼ÊÀàÐÍÈçºÎ£¬Ëü¶¼Ö§³ÖÒ»¸öiterator()µÄ·½·¨£¬¸Ã·½·¨·µ»ØÒ»¸öµü´ú×Ó£¬Ê¹Óøõü´ú×Ó¼´¿ÉÖðÒ»·ÃÎÊCollectionÖÐÿһ¸öÔªËØ¡£µäÐ͵ÄÓ÷¨ÈçÏ£º
¡¡¡¡¡¡¡¡Iterator it = collection.iterator(); // »ñµÃÒ»¸öµü´ú×Ó
¡¡¡¡¡¡¡¡while(it.hasNext()) {
¡¡¡¡¡¡¡¡¡¡¡¡Object obj = it.next(); // µÃµ½ÏÂÒ»¸öÔªËØ
¡¡¡¡¡¡¡¡}
¡¡¡¡ÓÉCollection½Ó¿ÚÅÉÉúµÄÁ½¸ö½Ó¿ÚÊÇListºÍSet¡£
List½Ó¿Ú
¡¡¡¡ListÊÇÓÐÐòµÄCollection£¬Ê¹Óô˽ӿÚÄܹ
Ïà¹ØÎĵµ£º
import java.util.ArrayList;
import java.util.List;
public class FenYe
{
static double allpage=0; //×ÜÒ³Êý
static double currpage=0; //µ±Ç°Ò³
static double pagesize=10; //ÏÔʾÐÐ
static int sta ......
Ò»¸öÓÅÐãµÄJava³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷ÔÀí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷ÔÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩJava³ÌÐòÉ ......
/**
* »ñÈ¡·þÎñÆ÷µÄwebµØÖ·
* @return
*/
private String getWebPath(){
String _tempStr = Thread.currentThread().getContextClassLoader().getResource("").toString();
_tempStr=_tempStr.substring ......
jspÊä³ö¸ñʽ»¯ºóµÄÈÕÆÚ
<fmt:formatDate value="${whiteNumber.crtdate }" pattern="yyyy-MM-dd HH:mm:ss"/>
ÈçÊÇmodelÀïµÄlistÔÚactionÖÐÈ¡²»µ½Öµ¡£¿ÉÄÜÔÚ¸ÃmodelÖеÄlistµÄsetterºÍgetter·½Ê½ÖУ¬Ê¹ÓõĿÉÄÜÊÇlazy¼ÓÔØ£¬¸ÄΪEAGER¼´¿É¡£
<s:iterator>±êÇ©ÀﻹÓÐ<s:iterator>± ......