Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ³£¼ûÉè¼ÆÄ£Ê½

³£ÓõÄÉè¼ÆÄ£Ê½·ÖΪÈçÏ 23 ÖÖģʽ£º
Abstract Factory£º
Ìṩһ¸ö´´½¨Ò»ÏµÁÐÏà¹Ø»òÏ໥ÒÀÀµ¶ÔÏóµÄ½Ó¿Ú£¬¶øÎÞÐèÖ¸¶¨Ëü
ÃǾßÌåµÄÀà¡£
Adapter£º
½«Ò»¸öÀàµÄ½Ó¿Úת»»³É¿Í»§Ï£ÍûµÄÁíÒ»¸ö½Ó¿Ú£¬Ê¹µÃÔ­À´ÓÉÓÚ½Ó¿Ú²»¼æÈݶø²»ÄÜÒ»Æð¹¤×÷µÄÄÇЩÀà¿ÉÒÔÒ»Æð¹¤×÷¡£
Bridge£º
½«
³éÏ󲿷ÖÓëËüµÄʵÏÖ²¿·Ö·ÖÀ룬ʹ֮¿ÉÒÔ¶ÀÁ¢±ä»¯¡ ......

Java ´óСд²»Ãô¸ÐÌæ»»

public static void replaceString(String source,String oldStr,String newStr){
          System.out.println(source);
          String result = source.replaceAll("(?i)"+oldStr
, newStr); //´óСд²»Ãô ......

java¶àÏ̵߳ÄЧÂʾÍÒ»¶¨¸ßÂð£¿

   ºÜ¾ÃûÉÏÀ´ÁË£¬·¢ÏÖËäÈ»×ÊÁϺÍÊé¿´µÄºÜ¶à£¬µ«ÊǺܾÃûÅöµÄ¶«Î÷»¹ÊǺÜÈÝÒ×µ­Íü¡£ÒÔºóÏ£ÍûÄܶà¼Ç¼°É¡£
   ½ñÌìÍæÁ˰ÑÏ̳߳أ¬²¢¶ÔÆäÖеIJÎÊý×öÁËһЩµ÷Õû£¬²¢¼Ç¼Ôڶಢ·¢Çé¿öÏÂÏß³ÌÊý¶Ô¸÷ÖÖÇé¿öµÄ·´Ó¦¡£³ÌÐòÊÇÍøÉÏÕҵ쬲¢×÷ÁËÉÔ΢Ð޸ġ£
javaµÄÏ̳߳ØÊµÏÖ£¬ThreadPool
package net.zj.hz.yk.thr ......

Java ELϵÁÐ 1.JUEL¼ò½é

¡¡¡¡inkfish·­Ò룬ÇëÎðÉÌÒµÐÔÖÊ×ªÔØ£¬×ªÔØÇë×¢Ã÷À´Ô´£¨http://blog.csdn.net/inkfish
£©¡£±¾ÎÄÊÇÎÒѧϰJUELͬʱ£¬¶ÔÔ­ÍøÕ¾½øÐеļòµ¥µÄ·­Òë£¬Ô­ÍøÕ¾µØÖ·£ºhttp://juel.sourceforge.net/
¡¡¡¡JUEL
ÊÇͳһ±í´ïʽÓïÑÔ£¨Unified Expression Language
, EL
£©µÄÒ»¸öʵÏÖ£¬ÊÇJSP 2.1
±ê×¼£¨JSR-245
£©µÄÒ»²¿·Ö£¬ÒѾ­×÷ΪJa ......

java ³õѧÕß µÚÒ»¸öÎÊÌâ

public class Test{
public static void main(String args[]){
System.out.println("This is a test program.");
}
}
½«ÉÏÃæµÄÕâ¶Î³ÌÐò±£´æÎªÎļþÃûΪTest.javaµÄÎļþ¡£
È»ºó´ò¿ªÃüÁîÌáʾ·û´°¿Ú£¬cdµ½ÄãµÄTest.javaËùÔÚĿ¼£¬È»ºó¼üÈëÏÂÃæµÄÃüÁî
javac Test.java
³ö´í:
Àà   Test   Êǹ«¹²µÄ£¬Ó¦ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ