ZiliangZiliang

Site navigation

  • Mortgage comparison
  • Japan tax calculator
  • Programming
  • Algorithms
  • Machine learning
  • Misc
Engineering
Contact
中文

Site navigation

  • Mortgage comparison
  • Japan tax calculator
  • Programming
  • Algorithms
  • Machine learning
  • Misc
Engineering
Contact

Article directory

  • Programming Languages

    • Overview
    • Basics
    • Collections
    • Flow Control Statements
    • Function
    • Libraries and Modules
    • IO, File, and OS
    • Errors and Exceptions
    • Object-Oriented Design
    • Namespaces and Scopes
  • Data Structures and Algorithms

    • Overview
    • Math Formula
    • Math Code
    • Misc
    • String
    • Tree Traversal
    • Balanced Binary Trees
    • Heap
    • Segment Tree
    • Dynamic Programming
    • Tree Misc
    • Java
    • Disjoint Sets
    • Graph Traversal
    • Minimum Spanning Tree
    • Single-Source Shortest Paths
    • Strongly Connected Components
    • Cut Vertices and Bridges
    • Cache
    • Binary Search
    • Quicksort
    • Knapsack Problem
    • Vertex Cover Problem
    • Set Cover Problem
    • Principle Component Analysis
    • K-Center Problem

Collections

python

Binder

Loading...

java

I always feel that the Collections Framework of Java is designed to be confusing, not only because of the naming of classes and methods, but also because of the result of Java's religious obsessoin with object-oriented programming.

There are two base interfaces in Java's Collections Framework, Collection ( java.util Interface Collection<E> ), and Map ( java.util Interface Map<K,V> ). Note that the name Collections( java.util Class Collections ) is an utility class providing static methods like sorting, searching, etc. You now know how ugly the names are designed!

Hierarchy of Java Collection framework
Hierarchy of Java Collection framework[1]
Java Map Hierarchy
Java Map Hierarchy[2]
Thread UnsafeThread Safe
StringBuilderStringBuffer
ArrayListVector
HashMap
(allows one null key and multiple null values)
HashTable
(doesn’t allow any null key or null value)
Properties
TreeMap (red black tree)
java.util.concurrent.*

Binder

Loading...

scala

https://docs.scala-lang.org/overviews/collections/overview.html

Binder

Loading...


  1. https://www.javatpoint.com/collections-in-java ↩︎

  2. https://www.javatpoint.com/java-map ↩︎

Edit this page on GitHub
Last Updated: 9/10/26, 7:37 AM
Contributors: Lucien
Prev
Basics
Next
Flow Control Statements