Java集合我应该用什么?

编程入门 行业动态 更新时间:2024-10-08 06:22:06
本文介绍了Java集合我应该用什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在这个问题How我可以有效地选择在C ++ 11标准库容器?是一个方便的流程图选择C ++集合时使用。

In this question How can I efficiently select a Standard Library container in C++11? is a handy flow chart to use when choosing C++ collections.

我认为这是人谁不知道哪个集合,他们应该使用,所以我试图找到一个类似的流程图Java和不能够这样做一个有用的资源。

I thought that this was a useful resource for people who are not sure which collection they should be using so I tried to find a similar flow chart for Java and was not able to do so.

什么是可以帮助人们选择正确的集合在Java编程时使用的资源和备忘单?人们怎么知道他们应该用什么名单,设置和地图的实现?

What resources and "cheat sheets" are available to help people choose the right Collection to use when programming in Java? How do people know what List, Set and Map implementations they should use?

推荐答案

因为我无法找到任何东西,我决定做一个自己。

Since I couldn't find anything I decided to make one myself.

该流程图并不试图掩盖的东西一样同步访问,线程安全等或传统的收藏品,但它确实涵盖了3个标准设置 S,3个标准地图和2个标准列表秒。

This flow chart does not try and cover things like synchronized access, thread safety etc or the legacy collections, but it does cover the 3 standard Sets, 3 standard Maps and 2 standard Lists.

主要其他有用的参考人可能是从Oracle文档描述每个Collection.

The main other useful reference to people is probably the following page from the oracle documentation which describes each Collection.

的HashSet VS TreeSet中

还有时使用的详细讨论的HashSet 或 TreeSet的在这里: VS的Hashset TreeSet的

There is a detailed discussion of when to use HashSet or TreeSet here: Hashset vs Treeset

的ArrayList VS的LinkedList

详细讨论:何时使用链表过的ArrayList

更多推荐

Java集合我应该用什么?

本文发布于:2023-11-28 21:47:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1644049.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应该用   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!