When I tried to use the hashtable class, Netbeans gave me an error saying:
While still supported, these classes were made obsolete by the JDK1.2 colle
There are cases when a method outside your control requires an Hashtable. Java's own javax.management.ObjectName is such an example[1].
When the external interface requires it you have to use Hashtable
.
In netbeans, you can use:
@SupresssWarnings("UseOfObsoleteCollectionType")
to suppress the warning locally.
See
1: I wonder why they used Hashtable
and not HashMap
, since ObjectName
is
available since 1.5 and Hashtable
is obsolete since 1.2