Initializing Hashtables in Java?
<p>In C# you can initialize Hashtables (and many other types of objects) using code like this -</p>

<pre><code>Hashtable table = new Hashtable {{1, 1}, {2, 2}};
</code></pre>

<p>Is there anything like this in Java or do you have to just declare the Hashtable first and then manually put items in it one by one?</p>
