How to add value into collection
<p>I have a Hashtable like this:</p>

<pre><code>Hashtable&lt;String, String&gt; ht = new Hashtable&lt;String, String&gt;();
 ht.put("A", "one");
 ht.put("B", "two");
</code></pre>

<p>Then I called its <code>values()</code> methods to get its values and stored in the
 Collection object like this:</p>

<pre><code>Collection&lt;String&gt; col = ht.values();
</code></pre>

<p>Now this collection object has these values:</p>

<pre><code> one, two.
</code></pre>

<p>Then I called <code>col.add(" three");</code> This time I got this error:</p>

<pre><code>Exception in thread "main" java.lang.UnsupportedOperationException.
</code></pre>

<p>I checked the API:</p>

<pre><code>If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false)
</code></pre>

<p>The value which I added("three") to collection is unique,not duplicate.But I can do other operations like <code>remove()</code> and <code>clear()</code> operations on it.</p>

<p>Not able to call <code>add()</code>.Why it is not allowing to add?</p>
