随笔分类 -  集合进阶

摘要:package com.集合进阶;import java.util.*;public class 杨杨牌学生储存系统 { public static void main(String[] args) { List<学生类> c=new ArrayList<学生类>(); y(c); } //定义一个 阅读全文
posted @ 2023-01-14 14:53 陈焕新 阅读(116) 评论(0) 推荐(0) 编辑
摘要:List集合的常用方法void add(int indexE element):在此集合中的指定位置插入指定的元素E remove(int index):删除指定索引处的元素,返回被删除的元素E set(int indexE element):修改指定索引处的元素,返回被修改的元素E get(int 阅读全文
posted @ 2023-01-13 00:30 陈焕新 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Collection集合常用方法:boolean add(E e):添加元素boolean remove(object o):从集合中移除指定的元素void clear():清空集合中的元素boolean contains(object o):判断集合中是否存在指定的元素boolean isEmpt 阅读全文
posted @ 2023-01-12 21:48 陈焕新 阅读(16) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示