开发者

Why are Vector and HashTable widely believed to be due for deprecation? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Why Java Vector class is considered obsolete or deprecated?

Also, is there an official word from Sun/Oracle on that?

Thanks.

EDI开发者_运维知识库T: I'm aware of the other topic, but it didn't mention whether there was an official word on this, which is why the topic is worded as "widely believed". Plus, that topic addresses only the Vector, not the Hashtable.


Vector is synchronized; usually you don't need this as it incurs serious overhead. Hashtable is also synchronized and can't reasonably store nulls.

People use various Lists and HashMap instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜