ArrayList
ArrayList<Integer> arrayList = new ArrayList<>();
ArrayList<Integer> arrayList1 = new ArrayList<>(Arrays.asList(1,2,3,4,5));
arrayList1.add(6);
arrayList1.add(7);
arrayList1.add(8);
arrayList1.get(3);
arrayList1.set(0, -1);
List<Integer> arrayList2 = arrayList1.subList(0, 3);
arrayList1.isEmpty();
arrayList1.size();
arrayList1.remove(0);
arrayList1.clear();
ArrayList<Integer> arrayList3 = new ArrayList<>(Arrays.asList(1,2,3,4,5));
Iterator<Integer> iterator = arrayList3.iterator();
int sum = 0;
while (iterator.hasNext()) {
sum += iterator.next();
}
System.out.println(sum);
HashMap
HashMap<Integer, String> hashMap = new HashMap<>();
hashMap.put(1, "김코딩");
hashMap.put(2, "나해커");
hashMap.put(3, "박진짜");
hashMap.get(3);
hashMap.size();
hashMap.keySet();
hashMap.entrySet();
hashMap.containsKey(1);
hashMap.containsValue("나해커");
hashMap.remove(1);
hashMap.clear();