A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© 至尊宝的温柔 中级黑马   /  2015-11-7 19:46  /  637 人查看  /  1 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

  1. package com.heima;

  2. import java.util.ArrayList;
  3. import java.util.Collection;

  4. public class De_Add {
  5.         public static void main(String[] args){
  6.                 Collection c = new ArrayList();
  7.                 c.add(new Student("zhangsan",23));
  8.                 c.add(true);
  9.                 c.add(100);
  10.                 boolean b1 = c.contains(true);
  11.                 System.out.println(b1);
  12.                 int s = c.size();
  13.                 System.out.println(s);
  14.                
  15.                
  16.                                
  17.         }
  18. }
复制代码

1 个回复

倒序浏览
编译不会通过的吧!找不到Student  类
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马