package com.cz.test.util.collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class Test {

public static void main(String[] args) {
Collection con=new ArrayList();
con.add("java");
con.add("C++");
con.add("C");
System.out.println(con.contains("java"));

//遍历
Iterator s=con.iterator();
while(s.hasNext()){//返回boolean值,
System.out.println(s.next());//一个一个输出
}
}
}

随机推荐

  1. jQuery_Ajax_Json 异步接收PHP端传来的json数据

    [json]{"user_id":"1172940","rmb_point":"0","weixin_id&q ...

  2. pg_dump 备份与恢复的简单操作

    pg_dump 是一个用于备份PostgreSQL数据库的工具.    该工具生成的转储格式可以分为两种,    脚本  :     其中脚本格式是包含许多SQL命令的纯文本格式  (常用)    归 ...

  3. 每日一九度之 题目1041:Simple Sorting

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:4883 解决:1860 题目描述: You are given an unsorted array of integer numbers. ...

  4. Python repr() 或str() 函数(转)

    Python 有办法将任意值转为字符串:将它传入repr() 或str() 函数.函数str() 用于将值转化为适于人阅读的形式,而repr() 转化为供解释器读取的形式(如果没有等价的语法,则会发生 ...

  5. linux ubuntu12.04 解压中文zip文件,解压之后乱码

    在windows下压缩后的zip包,在ubuntu下解压后显示为乱码问题 1.zip文件解压之后文件名乱码: 第一步 首先安装7zip和convmv(如果之前没有安装的话) 在命令行执行安装命令如下: ...

  6. c#记事本

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  7. Android activity界面跳转动画

    实现activity界面跳转动画 1.在startActivity方法之后加入: overridePendingTransition(R.anim.pull_in_right, R.anim.pull ...

  8. python学习笔记-day4笔记 常用内置函数与装饰器

    1.常用的python函数 abs             求绝对值 all               判断迭代器中所有的数据是否为真或者可迭代数据为空,返回真,否则返回假 any          ...

  9. 准确率(Precision)、召回率(Recall)以及F值(F-Measure)

    转载自:http://blog.csdn.net/yechaodechuntian/article/details/37394967 https://www.zhihu.com/question/19 ...

  10. 启动Print Spooler服务提示:"错误1068,依存服务或无法启动"

    本人windows8操作系统,从网上看到在运行中输入  sc config spooler depend= rpcss 即可,试了下果然有效.具体原因待了解.