Hashtable和Dictionary之间有什么区别? [英] What's the difference between Hashtable and Dictionary?

查看:164
本文介绍了Hashtable和Dictionary之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

字典 Hashtable 之间有什么区别,以及如何使用字典 c>

What's the difference between Dictionary and Hashtable and how do I work with the Dictionary class in Java?

推荐答案

Hashtable 的抽象基类。两者仍然在JDK中,用于向后兼容旧代码。我们希望使用 HashMap 和在Java 1.2中引入的 Map 接口的其他实现。

Dictionary is an abstract base class of Hashtable. Both are still in JDK for backwards compatibility with old code. We are expected to use HashMap and other implementations of Map interface introduced in Java 1.2.

这篇关于Hashtable和Dictionary之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆