Java Convert Hashtable to Treemap
Here is an example for converting Hashtable to TreeMap by using constructor method. This is available for all collection and map classes.
Map<Integer, String> map = new TreeMap<Integer, String>(hashTable); |
<pre><code> String foo = "bar"; </code></pre>
-
Shivam Singh