找回密码
 注册帐号
查看: 716|回复: 0

[电脑其他] 集合数组的输出方法

  [复制链接]
发表于 2011-5-2 00:29:37 | 显示全部楼层 |阅读模式
import java. util. *;   public class Demo02{   public static void main(String[] args){   List all=new ArrayList();   all. add("jack");   all. add("lucy");   all. add("java");   //集合数组的输出方法1   for(int i=0;i<all. size();i++){   System. out. println(all. get(i));   }   System. out. println(">>>***************>>>");   //集合数组的输出方法2   Iterator ite=all. iterator();   while(ite. hasNext()){   Object ss=ite. next();   System. out. println(ss);   }   }   } TAG: 集合 数组文章由 zhiwuyu.tk 植物语橄榄油好吗 整理,收集辛苦,希望能保留出处。

评分

参与人数 1魅力 -2 金币 -2 收起 理由
蝴蝶传说 -2 -2 http://www.lsyr.net/thread-6012-1-1.html

查看全部评分

您需要登录后才可以回帖 登录 | 注册帐号

本版积分规则

QQ|Archiver|手机版|小黑屋|依人网络官方网站 ( 陕ICP备19025998号-1 )

GMT+8, 2024-5-9 14:37 , Processed in 0.047289 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表