-
카테고리
-
세부 분야
프로그래밍 언어
-
해결 여부
미해결
질문 드립니다.
22.09.04 22:17 작성 조회수 113
0
안녕하세요!
StringFactioryProcess 클래스에서 질문 있습니다.
public static Queue<String> rawMaterialPlasticList = new LinkedList<>();
public static Queue<Map<String, Integer>> productStringList = new LinkedList<>();
public static Queue<Map<Integer, Map<String, Integer>>> inputList = new LinkedList<>();
위 코드에서 왜 ArrayList가 아닌 LinkedList가 사용되었나요?
답변을 작성해보세요.
0
JeongTaeHyun
지식공유자2022.09.05
Arraylist와 linkedlist는 같은 리스트이지만
특징이 다릅니다.
Array리스트는 순차적인 처리에 좋고
Linkedlist는 중간에 변경되는 게 많을 때
좋다라고 알아두시면 됩니다.
Linkedlist를 예제로 사용한 건 제 취향입니다.
답변 1