programming language/Java

HashTable, HashMap, ConcurrentHashmap

공대키메라 2022. 1. 10. 22:24

우선 hash가 무엇인지 알아봐야 하겠다. 

Hash란 정확히 무엇을 말하나?

아니.. .이거말고... ㅠㅠ

Humors get you through the tough time! Have fun :)

1. Hash이란?

key와 value가 쌍을 이루는 자료구조.

필요한 데이를 키 값을 통해 빠르게 탐색이 가능하며, 고유의 해쉬함수를 통해 데이터에 접근하는 구조.

 

그런데 이러한 Hash도 단점이 있는데...

 

Hash collection이 일어난다고 한다. 

 

 - 서로 다른 키의 해쉬 연산 결과가 같을 때 문제가 생기는 현상

 

참고: https://jroomstudio.tistory.com/10

참고 : https://siyoon210.tistory.com/85 

 

2. HashTable

 

A hash table is a type of data structure that stores key-value pairs. The key is sent to a hash function that performs arithmetic operations on it. The result (commonly called the hash value or hash) is the index of the key-value pair in the hash table.

 

참고 : https://www.educative.io/edpresso/what-is-a-hash-table

 

 

3. HashMap

 

참고 : https://www.javatpoint.com/java-hashmap

 

 

4. HashMap vs HashTable

 

참고 : https://mangkyu.tistory.com/102

 

4. ConcurrentHashMap

 

참고 : https://www.geeksforgeeks.org/concurrenthashmap-in-java/

 

 

진짜 어렵다... 

 

'programming language > Java' 카테고리의 다른 글

제네릭 이해하기  (2) 2022.03.26
interface vs abtract class  (4) 2022.02.06
BigInteger 사용하기  (0) 2022.01.18
Jar 과 War의 차이점은?  (0) 2022.01.16
DTO? VO? 개념 정리 및 사용 이유  (3) 2021.08.29