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

Java Êý×é List ÈçºÎ´«Öµ

// ºÏ²¢ List ÖеÄÏàͬÊý¾ÝÐÐ
// Source £º tmpOrderEntryListBeanList
// Target £º resultOrderEntryListBeanList
// ------------------------------------------------------------------

// £¨1£©½«½á¹û¸³¸ø Result Livon 2010-5-18 Èý
// ÕûÀíÁÐ±í£¬ÒÔ±ã²éѯ¿â´æ¡£
private List<OrderEntryListBean> setOrderEntryList(List<OrderEntryListBean> orderEntryListBeanList){

// £¨1£©½«½á¹û¸³¸ø Result Livon 2010-5-18 Èý
//List<OrderEntryListBean> resultList = orderEntryListBeanList;
ArrayList<OrderEntryListBean> list = new ArrayList<OrderEntryListBean>(orderEntryListBeanList);
ArrayList<OrderEntryListBean> resultList = (ArrayList<OrderEntryListBean>) list.clone();

int rdcID_i, rdcID_j ;
int itemID_i, itemID_j ;
double itemAmount_i, itemAmount_j = 0;
// £¨2£©´Ó×îºóÒ»ÐÐÏòÉÏÑ­»·£¬Ö±µ½µÚ2Ìõ£¨Èç¹û´æÔڵĻ°£©
for(int i = resultList.size() - 1; i > 0; i--){

rdcID_i = Integer.valueOf(resultList.get(i).getRdcId());
itemID_i = Integer.valueOf(resultList.get(i).getItemId());
itemAmount_i = Double.valueOf(resultList.get(i).getAmount());

// £¨3£©´ÓµÚÒ»Ìõ£¬ÏòÏ£¬Ö±µ½ÍâÑ­»·µÄµ¹ÊýµÚ2Ìõ¡£
for(int j = 0; j < i ; j++){

rdcID_j = Integer.valueOf(resultList.get(j).getRdcId());
itemID_j = Integer.valueOf(resultList.get(j).getItemId());
itemAmount_j = Double.valueOf(resultList.get(j).getAmount());

if(rdcID_i == rdcID_j && itemID_i == itemID_j ){
resultList.get(j).setAmount( String.valueOf(itemAmount_i + itemAmount_j));
resultList.remove(i);
break;
}
}

}
return resultList;

}


Ïà¹ØÎĵµ£º

java»ñµÃÍøÒ³ÄÚÈÝ

Íøַץȡ Java API ¸ÅÊö
 
http://code.google.com/intl/zh-CN/appengine/docs/java/urlfetch/usingjavanet.html
App Engine Ó¦ÓóÌÐò¿ÉÒÔÓëÆäËûÓ¦ÓóÌÐò½øÐÐͨÐÅ»òͨ¹ýץȡÍøÖ··ÃÎÊÍøÂçÉϵÄÆäËû×ÊÔ´¡£Ó¦ÓóÌÐò¿ÉÒÔʹÓÃÍøַץȡ·þÎñÀ´·¢³ö HTTP ºÍ HTTPS ÇëÇó²¢½ÓÊÕÏìÓ¦¡£³öÓÚЧÂʺÍÀ©Õ¹ÐÔ¿¼ÂÇ£¬Íøַץȡ·þÎñʹÓà G ......

javaÖжÑÓëÕ»µÄÇø±ð

JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄ(¶ÔÏó´ÓÖзÖÅä¿Õ¼ä¡£ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈ Ö¸ÁÁ¢£¬ËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµÄÊÍ·Å¡£¶ÑÊÇÓÉÀ¬»ø»ØÊÕÀ´¸ºÔðµÄ£¬¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅäÄÚ´æ´óС£¬Éú´æÆÚÒ²²»±ØÊÂÏȸæËß±àÒëÆ÷£¬ÒòΪËüÊÇÔÚÔËÐÐʱ ¶¯Ì¬·ÖÅäÄÚ´æµÄ£¬JavaµÄÀ¬»øÊÕ¼¯Æ÷»á×Ô¶¯ÊÕ×ßÕâЩ²»ÔÙ ......

´«ÖDz¥¿ÍJAVAÅàѵstruts2ѧϰ±Ê¼Ç

´«ÖDz¥¿ÍJAVAÅàѵstruts2ѧϰ±Ê¼Ç Ç°Á½ÌìÎÒÏÝÈëÁËstruts2Ô­ÀíµÄÄàÌ·Öв»¿É×Ô°ÇÁË£¬ÕâÖָоõÏ൱²»´í£¬µ«ÊÇÎÒ¸öÈË»¹ÊǸоõ»ù´¡Èç¹û²»ÊǺܺõĻ°£¬Ç§Íò²»ÒªÏÝÈ룬ÒòΪÕâÑùµÄ»°£¬ºÜÓпÉÄÜÈÃÒ»¸öÈ˱äµÃûÓÐÐÅÐÄ£¬»¹ºÃÎÒÊÇÒ»¸öÐÄÀí»¹´í²»´íµÄÈË£¬ËùÒԺܿì¾Í×ßÁ˳öÀ´¡£ËùÒÔ£¬ÎҵĸöÈ˸оõ»¹ÊÇ£¬ÏÈÕÆÎÕ»ù´¡£¬È»ºóÔÚÈ¥Àí½âÔ­Àí°É£¬Ò ......

ÔËÓüÓÃܼ¼Êõ±£»¤JavaÔ´´úÂë

ÔËÓüÓÃܼ¼Êõ±£»¤JavaÔ´´úÂë    
   
ÄÚÈÝ£º 
 
Ò»¡¢ÎªÊ²Ã´Òª¼ÓÃÜ£¿ 
¶þ¡¢¶¨ÖÆÀà×°ÈëÆ÷  

Èý¡¢¼ÓÃÜ¡¢½âÃÜ 
ËÄ¡¢Ó¦ÓÃʵÀý 
Îå¡¢×¢ÒâÊÂÏî 
²Î¿¼×ÊÔ´ 
Java³ÌÐòµÄÔ´´úÂëºÜÈÝÒ×±»±ðÈË
͵¿´¡£Ö»ÒªÓÐÒ»¸ö·´±àÒëÆ÷£¬ÈκΠ......

¡¾Ëæ±Ê¡¿java ÐéÄâ°´¼ü

import java.awt.Robot;
import java.io.IOException;
import java.lang.reflect.Field;
public class TestServer {
Class<?> key;
Robot ro;
{//·Ç¾²Ì¬¿éÓÃÓÚ³õʼ»¯ÀàÀàµÄ·Ç¾²Ì¬³ÉÔ±
try {
key = Class.forName("java.awt.event.KeyEvent");
ro = new Robot();
}
catch (Excep ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ