Java ArrayListʹÓÃ×ܽᣨһ£©
×î½üÒ»Ö±ÔÚʹÓÃJava£¬¸Ð¾õËüµÄÔ½½ç¼ì²é·Ç³£ÓÐЧ¡£ÕâÒ»µã¶ÔÓÚ³õѧÕßÀ´ËµÊǷdz£ÖØÒªµÄ£¨Ìá¸ß³ÌÐòµÄÑϽ÷ÐÔ£©£¬¶ÔÓÚÓоÑéµÄ³ÌÐòÔ±À´ËµÒ²ºÜÓаïÖú¡£JavaÖÐÓÐÒ»¸öºÜÓÐЧµÄArrayListÀà(¶ÁÕß¿ÉÒÔ½áºÏJava API
À´Ñ§Ï°Ëü)£¬¡£ËüºÍÒ»°ãµÄÊý×é²»Ò»Ñù£¬²»ÐèÒªÌáǰ·ÖÅä¹Ì¶¨µÄ¿Õ¼ä£¨Ê¹ÓñȽÏÁé»î£©£¬Ã¿´ÎʹÓõÄʱºò¿ÉÒÔÌí¼Ó½øÐµÄÔªËØ£¨¸Ð¾õ¾ÍÊDzÙ×÷¶ÔÓÚ³ÌÐòÔ±À´ËµÍ¸Ã÷»¯ÁË£¬ÓÐÐËȤµÄ¿ÉÒÔ×Ô¼º±àдÀ´ÊµÏÖÕâ¸öÀàµÄһЩ·½·¨£©¡£
1.±ÈÈçÄãÐèÒªÌí¼ÓStringÀàÐ͵ÄÊý×飺
ArrayList <String> s=new ArrayList<String>();//´´½¨ÁËsÀ´±£´æStringÊý×é
s.add("hello");//ÏòsÖÐÌí¼Óhello×Ö·û´®
s.add("arraylist");
for(int i=0;i<s.size();i++)//s.size()ÊÇArrayListµÄÒ»¸ö·½·¨£¬·µ»Ø½á¹ûÊÇsµÄ´óС,¾ÍÏñÊý×éµÄ³¤¶ÈÒ»Ñù
System.out.print(s.get(i)+“ ”);//s.get(i)ÊÇ»ñÈ¡sµÄµÚi¸öÔªËØÁË
ÕâÑùÔÚÖն˾ͻá´òÓ¡³öÈçϽá¹û£ºhello arraylist
2.µ±¶ÁÕßÐèÒª¶¨Òå×Ô¼ºÀ࣬²¢ÇÒÐèÒªÕë¶ÔËüÀ´´´½¨Êý×éµÄ»°£¬¿ÉÒÔÕâÑùʹÓã¨ÕâÀïÎÒÃǼÙÉ趨ÒåÒ»¸öѧÉúÐÅÏ¢£©£º
class Student//ÎÒÃDz»¶¨Òå·½·¨£¨³ý¹¹Ôì·½·¨ÒÔÍ⣩£¬Ò²¾ÍÊÇ˵°ÑStudentÀà×÷ΪCÓïÑÔÖеĽṹÌåÀ´Ê¹ÓÃ
{
String no;//ѧºÅ
String name;//ѧÉúÐÕÃû
String home;//¼Òͥסַ
public Student(String no, String name, String home)
{
this.no=no; this.name=name;this.home=home;
}
}
ArrayList <Student> s=new ArrayList<Student>();
s.add(new("001","Csdn","China"));//Ìí¼ÓÁËÒ»¸öѧÉú
//Èç¹ûÐèÒªÊä³ö»òÕßÊDZðµÄ´¦Àí£¬Çë¶ÁÕ߲ο¼api
ÒÔÉÏ´úÂëÆ¬¶Î²»¿Éµ¥¶ÀÖ´ÐУ¬ÐèÒªÉÏÏÂÎÄ¡££¨ÔÚÏÂÒ²ÊdzõѧÕߣ¬ËµµÄ²»ºÃµÄ»¹Çë¼ûÁ£¡£©
Ïà¹ØÎĵµ£º
C# JavaÃüÃû¹æÔò
C# (C#¸ß¼¶±à³Ì£¬Î¢ÈíÉè¼ÆÄ£Ê½)
ÃüÃû¿Õ¼ä£¬À࣬·½·¨ £ºÃ¿¸öµ¥´ÊµÄµÚÒ»¸ö×Öĸ´óд Àý ServerCode¡£
£¨²ÉÓÃPascal´óСд¹æÔò£©
˽ÓгÉÔ±£ºµ¥´ÊµÄµÚÒ»¸ö×ÖĸСд£¬Í¨³£Ç°Ãæ¼ÓÉÏ“_” Àý _name »ò _serverCode¡£
£¨²ÉÓÃcamell´óСд¹æÔò£©
Java (javaÉè¼Æ ......
ÎÄÕÂת×Ô£ºhttp://javastudy.blog.51cto.com/183528/78723
jsp¿ª·¢ÖÐµÄ ¼àÌýÆ÷ºÍ¹ýÂËÆ÷£¬ÕâÁ½¸ö¶«Î÷Ҫ˵ÆðÀ´£¬ºÜ´ó£¬ºÜ·±¡£½ñÌìÎÒÏëÓÃÒ»¸öÏÖʵµÄÀý×Ó£¬À´ËµÃ÷ÕâÁ½¸ö¶«¶«µÄ×÷Óá£
°¸ÀýÃèÊö
¼ÙÉèÄãÆ½Ê±Éú»îÔÚ±±¾©£¬ÓÐÌìÄãÈ¥Ò»¸öºÜ±ßÔ¶ºÜƶÇîµÄɽ´åÌåÑéÉú»î£¬µ½ÁËÄǸ ......
org.apache.commons.net.ftp.*ÖеÄFTPClientÀàʵÏÖµÄFTPÉÏ´«ÏÂÔØ¹¦ÄÜ£º
Ðèµ¼ÈëApacheµÄcommos-netµÄjar°ü£¬Èôµ¼ÈëµÄÊÇ1.4°æ±¾µÄ°ü£¬ÔòFTPFile[] fileList = ftpClient.listFiles()µÄÖ´Ðйý³ÌÖпÉÄܻᱨ´í£¬´Ëʱ¸ü»»µ¼Èë2.0°æ±¾µÄjar°ü£¬ÎÊÌâ¼´¿É½â¾ö¡£
´úÂëÈçÏ£º
package com.java.ftp;
import java.io.File;
import ......
ת £º http://www.jcourse.cn/read/234
2009-03-02 ×÷Õß:
zhangtaolv
ÔÚÎÒÃÇÈÕ³£¿ª·¢ÖУ¬¾³£»áÓöµ½¶ÔÎı¾µÄ²Ù×÷£¬²¢ÇÒÔÚÒ»°ãµÄMISϵͳÖУ¬Îı¾²Ù×÷ÓÈΪ¶à£¬ÈçÓû§Ãû¡¢ÎÄÕÂÄÚÈÝ¡¢ÎÄÕ±êÌâ¡¢ºÏͬÄÚÈݵȡ£ÔÚ֮ǰµÄ½Ì³ÌÖУ¬ÎÒÒ²¸ø´ó¼Ò½²½âÁËJavaÖÐ×î»ù±¾µÄ×Ö·û´®²Ù×÷µÄÀ࣬String¡£ÔÚ֮ǰµÄ½Ì³ÌÖÐÎÒÒ²¸ø´ó¼Ò½²ÁËStr ......
1£¬¸ÅÊö£ºÏß³ÌµÄ¹ÒÆð²Ù×÷ʵÖÊÉϾÍÊÇʹÏ߳̽øÈë“·Ç¿ÉÖ´ÐД״̬Ï£¬ÔÚÕâ¸ö״̬ÏÂCPU²»»á·Ö¸øÏß³Ìʱ¼äƬ£¬½øÈëÕâ¸ö״̬¿ÉÒÔÓÃÀ´ÔÝÍ£Ò»¸öÏ̵߳ÄÔËÐУ»ÔÚÏß³Ì¹ÒÆðºó£¬¿ÉÒÔͨ¹ýÖØÐ»½ÐÑÏß³ÌÀ´Ê¹Ö®»Ö¸´ÔËÐС£µ±Ò»¸öÏ߳̽øÈë“·Ç¿ÉÖ´ÐД״̬£¬¼´¹ÒÆð״̬ʱ£¬±ØÈ»´æÔÚijÖÖÔÒòʹÆä²»ÄܼÌÐøÔËÐУ¬ÕâЩÔÒò¿ÉÄÜ ......