差异黑白ArrayList和HashTable,哪一个是同步的,并且给我一个实时示例? [英] Diffrence B/W ArrayList and HashTable, Which one is synchronized and give me one Real Time example of this?
本文介绍了差异黑白ArrayList和HashTable,哪一个是同步的,并且给我一个实时示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
差异黑白ArrayList和HashTable,哪一个是同步的,并给我一个实时示例?
以示例为例....
Diffrence B/W ArrayList and HashTable, Which one is synchronized and give me one Real Time example of this?
With tread example....
推荐答案
您真的希望我们为您做功课吗.....
你去了:
C#ArrayList [ ^ ]和 C#哈希表 [ ^ ]
Do you really expect us to do your homework for you...ok..
here you go:
C# ArrayList[^] and C# HashTable[^]
Arraylist是对象的集合(可能具有不同的类型).
Arraylist与array非常相似,但是它可以采用不同数据类型的值.
如果要在数组列表中查找内容,则必须遍历数组列表中的每个值,没有更快的出路.
Hashtable也是一个集合,它采用与每个值相对应的键.
如果要在哈希表中查找内容,则不必遍历哈希表中的每个值,而是搜索键值并且速度更快.
Arraylist is a collection of objects(may be of different types).
Arraylist is very much similar to array but it can take values of different datatypes.
If you want to find something in a arraylist you have to go through each value in arraylist, theres no faster way out.
Hashtable is also collection which takes a key corresponding to each values.
If you want to find something in a hashtable you dont have to go through each value in hashtable, instead search for key values and is faster.
这篇关于差异黑白ArrayList和HashTable,哪一个是同步的,并且给我一个实时示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文