[英]Java datastructures/ C++ STL equivalents?
I just started learning java.我刚开始学习java。 I already know C++ and python.我已经知道 C++ 和 python。 In order to learn Java, I am kinda drawing analogies from what I know in C++.为了学习 Java,我有点用我在 C++ 中所知道的做类比。 I was an avid user of STL libraries in C++ (vectors, deques, stacks, hashmaps) http://www.sgi.com/tech/stl/stl_introduction.html我是 C++ 中 STL 库的狂热用户(向量、双端队列、堆栈、哈希图) http://www.sgi.com/tech/stl/stl_introduction.html
At the same time, python also have standard dicts, lists etc easily figurable in their docs.同时,python 在他们的文档中也有标准的字典、列表等。
I have been googling lately to find STL equivalent in Java but am unable to find so?我最近一直在谷歌上搜索 Java 中的 STL 等价物,但找不到? Can someone point me to right resources?有人可以指出我正确的资源吗?
Important notice: the mentioned associations have similar API but may have different asymptotics of operations and implementation.重要提示:上述关联具有相似的 API,但可能具有不同的操作和实现渐近线。
Notice: ju
means java.util
.注意: ju
表示java.util
。
This is the official page for the Collections API: http://docs.oracle.com/javase/tutorial/collections/index.html 这是Collections API的官方页面: http : //docs.oracle.com/javase/tutorial/collections/index.html
I'd also recommend the Thinking in Java book by Bruce Eckel. 我还推荐Bruce Eckel撰写的Thinking in Java一书。 (http://mindview.net/Books/TIJ4) The "Holding your objects chapter" provides an introduction and the "Containers in depth chapter" provides more information (including performance considerations). (http://mindview.net/Books/TIJ4)“持有你的对象章节”提供了一个介绍,“容器深度章节”提供了更多信息(包括性能考虑因素)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.