note java7_2
来源:互联网 发布:音轨软件 编辑:程序博客网 时间:2024/05/21 12:36
note java7_2
public class CollectionTest {/** * @param args */public static void main(String[] args) {// TODO Auto-generated method stubCollection list=new LinkedList();list.add(1);list.add(2);System.out.println(list.isEmpty());System.out.println(list.size());System.out.println(list.contains(2));list.remove(1);Object[]array=list.toArray();for(Object x:array){System.out.println(x);}}}
public class IteratorTest {public static void main(String[] args) {// TODO Auto-generated method stubCollection list=new LinkedList();list.add(1);list.add(2);list.add(3);list.add(4);System.out.println(list.size());Iterator iterator=list.iterator();while(iterator.hasNext()){Object object=iterator.next();System.out.println(object);if(object.equals(2)){iterator.remove();}}iterator=list.iterator();while(iterator.hasNext()){System.out.println(iterator.next());} }}
- note java7_2
- note
- note
- NOTE
- note
- Note
- note
- note
- Note
- note
- Note
- Note
- note
- Note
- Note
- Note
- note
- note
- 五、说说git reset命令
- 图像分割之(五)活动轮廓模型之Snake模型简介
- 2013-2014 ACM-ICPC, NEERC, Moscow Subregional Contest (2013区域赛练习)
- PHP 系统中已定义的常量
- Linux 2.6内核的编译步骤及模块的动态加载
- note java7_2
- 图像分割之(六)交叉视觉皮质模型(ICM)
- java编程的78条黄金法则
- Linux 消息队列
- 20131029关于个人的CSS层叠样式表作业
- addContentView跟setContentView的区别
- Cassandra配置
- Hadoop系列相关优秀网站收集
- Linux下部署svn服务