Algorithm
-
List 개념 및 예제#1Algorithm/List 2021. 12. 25. 14:28
List 인터페이스는 컬렉션 프레임워크의 한 종류로 배열이라고 생각하면 간단하다. 주로 순서가 있는 자료 관리에 유용하게 사용되고 중복을 허용한다. 크게 arrayList, LinkedList, Vector로 구분되고 Stack과 Queue도 List 인터페이스에 속한다. ArrayList : 객체 배열 클래스, List = new ArrayList();와 같은 문법으로 주로 사용 Vector : 멀티 스레드에서 주로 사용하고, 동기화를 제공한다. 동기화 구현시 작업이 이루어지는 자원에 대해 잠금 을 수행하므로 ArrayList보다 수행속도가 느리다. LinkedList : ArrayList보다 중간에 자료를 추가, 제거하는데 시간이 적게 걸린다. LinkedList는 자료의 추가, 제거 시 각 요소가 ..