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

Java List±éÀú·½·¨ ¼°ÆäЧÂʶԱÈ

One:14109
Two:14000
Three:15141
four:14297
package com.zbalpha.test;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class ListTest {
    public static void main(String args[]){
        List<Long> lists = new ArrayList<Long>();
        for(Long i=0l;i<1000000l;i++){
            lists.add(i);
        }
       
        Long oneOk = oneMethod(lists);
        Long twoOk = twoMethod(lists);
        Long threeOk = threeMethod(lists);
        Long fourOk = fourMethod(lists);
       
        System.out.println("One:" + oneOk);
        System.out.println("Two:" + twoOk);
        System.out.println("Three:" + threeOk);
        System.out.println("four:" + fourOk);
       
    }
   
    public static Long oneMethod(List<Long> lists){
       
        Long timeStart = System.currentTimeMillis();
        for(int i=0;i<lists.size();i++)    {
            System.out.println(lists.get(i));
        }
        Long timeStop = System.currentTimeMillis();
        return timeStop -timeStart ;
    }
 &


Ïà¹ØÎĵµ£º

JAVAÏ̳߳صÄʹÓÃ

Ï̳߳ØÀàΪ java.util.concurrent.ThreadPoolExecutor£¬³£Óù¹Ôì·½·¨Îª£º ThreadPoolExecutor(int corePoolSize, int maximumPoolSize,
long keepAliveTime, TimeUnit unit,
BlockingQueue<Runnable> workQueue,
RejectedExecutionHandler handler) corePoolSize£º Ï̳߳ØÎ¬»¤Ï̵߳Ä×îÉÙÊýÁ¿ ......

UbuntuÏÂJAVA¿ª·¢»·¾³²¿Êð

°²×°¿ª·¢»·¾³
ubuntu9.10ϰ²×°JAVA¿ª·¢»·¾³Æäʵ»¹ÊDZȽϼòµ¥µÄ£¬ÎÒÃǾÍÒÔ°²×°³£ÓõÄjdk¡¢eclipse¡¢tomcat¡¢svn client£¨ÕÒµ½Ò»¸ö¿ÉÒÔºÍwindowsÖеÄСÎÚ¹êÀàËÆµÄµ«°²×°»¹ÓеãÎÊÌâ½â¾öºó»á²¹ÉÏ£©¡¢oracle clientΪÀý½²½²ÈçºÎ°²×°£¨±¾ÎÄÖÐ×Ô¶¯»¯°²×°½Å±¾ÏÂÔØhttp://download.csdn.net/source/2034239,ÎļþÌ«´ó·Ö³É6·Ý £©¡£Ç° ......

javaÒì³£¸ÐÊÜ

½ñÌìÀ´½²Ï¹ØÓÚJavaÒì³£ÎÊÌâ¡£ÆäʵÔÚ¿ª·¢¹ý³ÌÖÐJavaµÄÒì³£´¦Àí²¢Ã»ÓÐÏëÏóÖеÄÄÇô¼òµ¥£¬¼òµ¥µÄ˵Java²»×ãÖ®´¦£¬ÄÇôÒì³£´¦Àí»úÖÆÒ²¿ÉÒÔËãÒ»¸ö£¨¸öÈ˹۵㣩¡£ÎªÊ²Ã´ÎÒ»áÕâÑùÈÏÎªÄØ£¿ÏÂÃæÎÒ½«ÔÚ¿ª·¢¹ý³ÌÖÐÓÃ×Ô¼ºµÄ˼ά·½Ê½À´½âÊÍÏÂÒ쳣ʹÓá£
JavaµÄÒì³£´óÖ·ÖΪ3Àࣺ
ExceptionÀà¡¢RuntimeExceptionÀàºÍErrorÀ࣬£¨¾ßÌåÒâË ......

JavaÁíÒ»ÖÖ·ÖÒ³¼¼Êõ

 ÕûÌåϵͳ²ÉÓÃJavaÖÐSpring ,Struts, Hibernate×é³É¡£
ÔÚActionÖУº
public ActionForward orgview(ActionMapping mapping, ActionForm form,HttpServletRequest request,HttpServletResponse response) {
// TODO Auto-generated method stub
ActionForward forward = new ActionForward("strpath");
Http ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ