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. Oracle性能优化--DBMS_PROFILER

      想看到过程或者函数执行每一步的过程:想看到每一步所占的时间吗?借助profiler吧:它可以满足你来分析过程/函数执行比较久:可以直接快速找到病因:从而可以优化那一步需要优化下.        一 ...

  2. sql 语法

    CASE ISNULL(b.enddate , '2000-1-1') WHEN '2000-1-1' THEN '未发稿' ELSE '已经发稿' END 如果时间为空,则显示为值‘200-1-1’ ...

  3. EFsql笔记

    like的语法 string[] cities = { "London", "Madrid" }; IQueryable<Customer> cus ...

  4. PHP下的购物车

    导航 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta h ...

  5. Android activity界面跳转动画

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

  6. torch基本操作

    1.在terminal中th进入troch,th+文件名.lua运行文件.进入torch之后,dofile+"文件名.lua"运行文件

  7. ubuntu配置服务器环境

    今天环境不知道怎么就不能用了.自己新配了一个: 添加源: vi /etc/apt/sources.list 将下面这些源添加进去: deb http://debian.ustc.edu.cn/ubun ...

  8. Android WebView使用基础

    WebView基本使用 WebView是View的一个子类,可以让你在activity中显示网页. 可以在布局文件中写入WebView:比如下面这个写了一个填满整个屏幕的WebView: <?x ...

  9. 2016年10月29日 星期六 --出埃及记 Exodus 19:14

    2016年10月29日 星期六 --出埃及记 Exodus 19:14 After Moses had gone down the mountain to the people, he consecr ...

  10. 2016年7月2日 星期六 --出埃及记 Exodus 14:29

    2016年7月2日 星期六 --出埃及记 Exodus 14:29 But the Israelites went through the sea on dry ground, with a wall ...