简体   繁体   English

Java中的动态数组 - 我有哪些选择?

[英]Dynamic Arrays in Java - What are my options?

Now, before you start clicking the down arrow on this question, hear me out. 现在,在您开始点击此问题的向下箭头之前,请听我说。

I am doing a paper on Dynamic Arrays in my Java class. 我正在Java类中写一篇关于动态数组的论文。 I already know the normal Arrays (1D and 2D) and the ArrayList. 我已经知道了普通的数组(1D和2D)和ArrayList。 Now, My teacher claims there are more kinds of dynamic arrays, but she refuses to tell me anything since I'm the one that is suppose to do the work. 现在,我的老师声称有更多种类的动态数组,但她拒绝告诉我任何事情,因为我是那个想做这项工作的人。

I have searched around, and the only thing I found was Linked List, and it doesn't even work with arrays. 我一直在搜索,我发现的唯一的东西是Linked List,它甚至不能用于数组。 I simply can't find anything anywhere of other Dynamic Arrays. 我根本找不到任何其他动态阵列的东西。 Could someone explain to me what are the types of dynamic arrays (if there are more then ArrayList) and maybe give me some insight about it? 有人可以向我解释一下动态数组的类型是什么(如果还有更多的ArrayList)并且可能会给我一些洞察力吗? If not, just the types would be good. 如果没有,只是类型会很好。 Really struggling here... 真的在这里挣扎......

Thanks. 谢谢。

EDIT: Turns out she wants Dynamic data structures, not arrays. 编辑:原来她想要动态数据结构,而不是数组。 so imagine everytime you read arrays up there it was written "data structures". 所以想象每当你在那里阅读数组时,就会写成“数据结构”。 sorry 抱歉

EDIT: So let me see if I got it all: I need to talk about java collections, java vectors, and Lists (talking a litle bit of all the List types). 编辑:那么让我看看我是否得到了所有:我需要谈谈java集合,java向量和列表(谈论所有List类型的一小部分)。 Anything missing? 有什么遗失?

CopyOnArrayListArrayList相同,但允许并发修改。

有关列表的更多信息,请参阅此处的基于动态数组概念的ArrayList和LinkedList

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM