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 ;
}
&
Ïà¹ØÎĵµ£º
2009Äê10ÔÂ31ÈÕ ÐÇÆÚÁù 15:32
package Client;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.nio.channels.Il ......
¹Ø¼ü×Ö: json java
JSON-libÕâ¸öJavaÀà°üÓÃÓÚ°Ñbean,mapºÍXMLת»»³ÉJSON²¢Äܹ»°ÑJSONת»Ø³ÉbeanºÍDynaBean¡£
ÏÂÔØµØÖ·:http://json-lib.sourceforge.net/
»¹ÒªÐèÒªµÄµÚ3·½°ü:
org.apache.commons(3.2ÒÔÉϰ汾)
org.apache.oro
net.sf.ezmorph(ezmorph-1.0.4.jar)
nu.xom
1¡¢List
Java´úÂë
boolean[] bool ......
×î½üÓÐÍøÓÑÎÊ£ºÈçºÎÈÃÒ»¸öJARÎļþËæJVMÆô¶¯Ê±ÔËÐУ¿java.exeÊDz»Äܹ»×ö³ÉÕâÑùµÄ£¬²»¹ý¿ÉÒÔ×Ô¼º¶¨ÖÆjava.exe£¬¶¨ÖÆjava.exeÔÚÈçÏÂÇé¿öÓÐÓãº
1.²»Ïë³ÌÐòµÄ½ø³ÌÃûÏÔʾΪjava.exe
2.Ï£Íû³ÌÐòË«»÷¾Í¿ÉÒÔÔËÐС£
ÏÂÃæÊÇÒ»¶ÎʾÀý´úÂ룺
// JVM_CPP.cpp : Defines the entry point for the console application.
//
#include ......
¼´½«Òª×ßÉϹ¤×÷¸ÚλÁË£¬µ«ÊÇ×Ô¼º»¹ÔÚÓÌÔ¥Öе½µ×ÊÇÑ¡Ôñc#»¹ÊÇjava£¬¶¼ËµjavaÒÔºóµÄǰ¾°·Ç³£µÄÀÖ¹Û£¬Ö÷ÒªÊÇÌåÏÖÔÚÒÆ¶¯Í¨ÐÅÆ½Ì¨ÉÏ£¬µ«ÊÇC#×÷Ϊ΢ÈíµÄ“ɱÊÖïµ”£¬Óë´Ëͬʱ΢Èí×÷Ϊҵ½çÀÏ´óµÄµØÎ»ËÓÖÄܺ³¶¯ÄÄ£¬Î´À´µÄÔÆ¼ÆËã¶Ô¼ÆËã»úÖÕ¶ËÆ½Ì¨µÄ¸ïÃüÐԵĸı䣬windows²Ù×÷ϵͳµÄ°ÔÖ÷µØÎ»²ÅÓпÉÄܱ»º³¶¯¡£c#µÄ·½±ã¼òµ¥Ó ......