ArrayList中的remove方法详解

ArrayList类中一共给出了两种remove方法,下面来对这两种方法详解: 1、参数为元素下标(int型) 对于这个方法,里面的参数是要删除元素的下标,我们可以使用students(arraylist定义的对象名).remove(students.indexOf(stu(类定义的对象名)))如下(只是示范,具体的自己写): static List<Student> students = new
相关文章
相关标签/搜索