Pick a random element from a Hashtable
<p>How do I generate a random <code>char</code> in java that is present in a hashtable?</p>
<p>For example, from the following table, I would like to choose either <code>X</code>, <code>O</code> or <code>I</code> randomly and put that value in <code>randomChar</code>.</p>
<pre><code>char randomChar = 'O';

Hashtable ht = new Hashtable();
ht.put(1, 'X');
ht.put(10, 'O');
ht.put(12, 'I');
</code></pre>