Java-集合
2025-4-7
| 2025-4-15
Words 138Read Time 1 min
type
status
date
slug
summary
tags
category
icon
password

1.集合框架图

notion image
notion image

2.Collection的方法

int size();
boolean isEmpty();
boolean contains(Object o);
boolean add(E e);
boolean remove(Object o);
boolean containsAll(Collection<?> c);
boolean addAll(Collection<? extends E> c);
boolean removeAll(Collection<?> c);
void clear();

3.集合的遍历

3.1 Iterator

3.2增强for循环

for(遍历对象的类型 遍历变量:要遍历集合的名称)
增强for循环的底层仍然是Iterator迭代器
  • 开发
  • Spring中的面向切面编程如何用Notion+Vercel+Github搭建一个属于自己的个人博客?
    Loading...