为什么Java中的哈希表(Hashtable)中的't'没有大写 [英] Why is the 't' in Hash Table(Hashtable) in Java not capitalized

查看:244
本文介绍了为什么Java中的哈希表(Hashtable)中的't'没有大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java中的所有内容似乎都遵循除Hashtable之外的大小写规则。

Everything in Java seems to follow capitalization rules except for Hashtable.

Hashtable<String, String> ht = new Hashtable<String, String>();

而不是

ArrayList<String> a = new ArrayList<String>();

HashMap<String,Integer> a = new HashMap<String,Integer>(); 

这是为什么?哈希表只读一个字(Hashtable)吗?

Why is this ? Is Hash Table read as just one word (Hashtable) ?

推荐答案

Hashtable 是在Java v1中创建的。集合的一致命名约定稍后在Java2中建立,当其他类作为全新Java Collection Framework的一部分发布时。

Hashtable was created in Java v1. The consistent naming conventions for collections were established later, in Java2, when the other classes were published as part of the brand new Java Collection Framework.

哪个btw使 Hashtable 已过时,因此不应在新代码中使用。

Which btw made Hashtable obsolete, so it should not be used in new code.

希望有所帮助。

这篇关于为什么Java中的哈希表(Hashtable)中的't'没有大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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