티스토리 뷰
728x90
Map말고는 따로 정리한 적이 없는 것 같아서
Collection Framework를 정리해보고자 한다
Collection이란?
쉽게 말해 다수의 데이터, 데이터 그룹
Collection Framework
데이터 그룹을 저장하는 클래스들의 표준 설계
주요 인터페이스
List
순서가 있는 데이터 집합으로 중복 허용
- Vector : ArrayList랑 기능적으로 동일 따라서 개선된 ArrayList 사용 권장
- ArrayList : 배열을 이용한 리스트
- LinkedList : 데이터 연결을 이용한 리스트
// Linked list implementation in Java
class LinkedList {
// Creating a node
Node head;
static class Node {
int value;
Node next;
Node(int d) {
value = d;
next = null;
}
}
public static void main(String[] args) {
LinkedList linkedList = new LinkedList();
// Assign value values
linkedList.head = new Node(1);
Node second = new Node(2);
Node third = new Node(3);
// Connect nodess
linkedList.head.next = second;
second.next = third;
// printing node-value
while (linkedList.head != null) {
System.out.print(linkedList.head.value + " ");
linkedList.head = linkedList.head.next;
}
}
}
https://www.programiz.com/dsa/linked-list
Linked List Data Structure
Linked list Data Structure In this tutorial, you will learn about linked list data structure and it's implementation in Python, Java, C, and C++. A linked list is a linear data structure that includes a series of connected nodes. Here, each node stores the
www.programiz.com
LinkedList가 어떤 구존지 이해가 어려워서 찾아봤다
다음 순서를 정말 링크처럼 걸어 준다!!!
Set
순서 없고, 중복 비허용하는 데이터 집합
- HashSet
- TreeSet
Map
Key, Value 쌍으로 이뤄진 데이터 집합으로 순서 없고, 중복 비허용
- HashMap
- HashTable
- TreeMap
- SortedMap
결론
Collections | 순서 | 특징 |
List | ⭕ | 중복⭕ |
Set | ❌ | 중복❌ |
map | ❌ | Key, Value 쌍 |
728x90
'(기초)그래서 뭘 배운거야? > Java' 카테고리의 다른 글
JV-92-자료구조 (0) | 2022.03.23 |
---|---|
JV-90-Overriding과 Overloading (0) | 2022.03.23 |
JV-89-Class / Object / Instance의 차이점 (0) | 2022.03.23 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 정보처리기사필기
- 정보처리기사실기
- 줄글
- pretag
- usemap
- 긴문장
- boldtag
- tablespan
- 정보처리기사
- 합격
- 93점
- 2021년2회
- spantag
- ul>li
- 정처기
- imgtag
- hn태그
- ptag
- 단락태그
- tabletag
- hr tag
- 비전공
- html
- br tag
- emtag
- 2021년42회
- ol>li
- 복습
- marktag
- definition List
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함