- package com.heima;
- import java.util.ArrayList;
- import java.util.Collection;
- public class De_Add {
- public static void main(String[] args){
- Collection c = new ArrayList();
- c.add(new Student("zhangsan",23));
- c.add(true);
- c.add(100);
- boolean b1 = c.contains(true);
- System.out.println(b1);
- int s = c.size();
- System.out.println(s);
-
-
-
- }
- }
复制代码 |
|