
本文共 3854 字,大约阅读时间需要 12 分钟。
Java������������������
Java���������������Java������������������������������������������������������������������������������������������������������������������������������������������������������������������Collection���List���Set���Map���������������������������������������������������������������������������������������Java������������������
Collection������
Collection���������������������������������������������������������������������������������������������������������������������������������������������
- ���������������������
- ���������������������
������������������������ArrayList���LinkedList���
List������
List���������Collection������������������������������������������������������������������������������������������
- ������������������
- ������������������
������������������������ArrayList���������������������������������������LinkedList���������������������������������������������������
Set������
Set���������Collection������������������������������������������������������������
- ������������������
- ������������������������
������������������������HashSet���������������������TreeSet���������������������
Map������
Map���������Collection������������������������������������������������������������������������������������������������������������������
- ���������������
- ���������������
- ������������null
������������������������HashMap���������-map������TreeMap���������-map������
ArrayList���������
ArrayList���������������������������������������������������������������������������������������
������������
add(Object o)
������������������������������������add(int i, Object o)
������������������������������������
������������
get(int i)
������������������������������
������������
remove(int i)
������������������������������remove(Object o)
���������������������������������
������������
contains(Object o)
���������������������������������������������
������������������
size()
���������������������������������
LinkedList���������
LinkedList���������������������������������������������������������������������������������������������������operations���������
������������
LinkedList list = new LinkedList();
������������
addFirst(String value)
������������������������������������addLast(String value)
������������������������������������
������������
getFirst()
������������������������������getLast()
������������������������������
������������
remove()
������������������������������������removeFirst()
������������������������������removeLast()
������������������������������
������������
contains(Object o)
���������������������������������������������
Map������
Map���������������������������������������������������������������
������������
Mapmap = new HashMap<>();
���������������
map.put("���", "���")
���������map.put("���������", "������");
���������
map.get("���")
���������map.get("���������");
������������������
map.size()
������������������������������
���������������
map.keySet()
������������������������������
���������������
map.values()
������������������������������
���������������
map.remove("���")
���������map.remove("���������");
Iterator���������
Iterator������������������������������������������
hasNext()
���������������������������������������next()
���������������������������Iterator������������������������������������������������������������Iterator������������
Generics������������
������������������������������������������������
List������������
-
���������
List
list = new ArrayList (); -
������������������������������������������������������
���������list.add("���������");
Map������������
-
���������
Map
map = new HashMap (); -
���������������������������������������������������������
���������map.put("������", "������");
������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
