Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# Java 集合框架补充知识点 #60

Open
frank-lam opened this issue Sep 22, 2020 · 0 comments
Open

# Java 集合框架补充知识点 #60

frank-lam opened this issue Sep 22, 2020 · 0 comments

Comments

@frank-lam
Copy link
Owner

以下哪些java容器是线程安全的( )

  • Vector
  • ArrayList
  • HashSet
  • ConcurrentHashMap

Vector 是list的三个实现类里唯一一个线程安全的集合 它用了synchronized () 另外两个是实现类 ArrayList LinkedList
HashSet 线程不安全 无序集合
ConcurrentHashMap 该类位于 java.util.concurrent 包下,专门用于解决并发问题。 线程安全 另一个是 Hashtable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant