Replies: 3 comments 3 replies
-
ArrayList 에서 Random Access를 빼면 List가 되고 |
Beta Was this translation helpful? Give feedback.
-
Array는 index를 사용, 고정적 크기를 가진다. 따라서 무작위로 접근이 가능하다.| |
Beta Was this translation helpful? Give feedback.
-
Array는 생성할 때 크기를 할당할 수 있고, 이 크기는 고정적이며 변경 불가하다. (변경하려면 새로운 Array를 선언) 또한 index를 가지고 값을 저장하거나 삭제하는데, 예를 들어 1, 3, 5번 index에 값을 할당하면 0, 2, 4번 index에는 값이 없음에도 불구하고 메모리가 낭비된다. 마지막으로 index는 메모리상에 데이터가 index별로 연속적으로 들어가게 된다. 반박해주세요. |
Beta Was this translation helpful? Give feedback.
-
ArrayList는 array와 List를 합친 개념입니다.
그렇다면 ArrayList에서 어떤 주요기능을 빼면 Array가 되고 List가 되는지 설명해 봅시다.
Beta Was this translation helpful? Give feedback.
All reactions