1 ๋ถ„ ์†Œ์š”

๐Ÿ“š ALGORITHM


๐Ÿ“š ArrayList & HashMap

Collection

  • List ๊ณ„์—ด
    • AbstractList, ArrayList, LinkedList, Vector
  • Map ๊ณ„์—ด
    • AbstractMap, Attributes, HashMap, Hashtable, identityHashMap, RenderingHints, TreeMap, WeakHashMap
  • Set ๊ณ„์—ด
    • AbstractSet, HashSet, LinkenHashSet, TreeSet
  • Collection, List, Map, Set์€ ๋ชจ๋‘ ๊ตฌํ˜„๋˜์ง€ ์•Š์€ Interface์ด๋‹ค.
  • ๊ทธ๋ž˜์„œ ๊ตฌํ˜„๋œ class๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ •์˜ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.
  • List a = new List(); -> X
  • List a = new ArrayList(); -> O ( ๋‹คํ˜•์„ฑ -> ๋ถ€๋ชจ๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์ž์‹์˜ ํ˜•ํƒœ๋กœ ๋‚˜ํƒ€๋‚ผ ์ˆ˜ ์žˆ๋‹ค.)

๊ณ„์—ด๋“ค ํŠน์ง•

ArrayList์™€ HashMap์˜ ์ฐจ์ด