title: Compact syntax for instantiating an initializing collection
body: <p>I'm looking for a compact syntax for instantiating a collection and adding a few items to it. I currently use this syntax:</p>
  
  <pre><code>Collection&lt;String&gt; collection = 
      new ArrayList&lt;String&gt;(Arrays.asList(new String[] { "1", "2", "3" }));
  </code></pre>
  
  <p>I seem to recall that there's a more compact way of doing this that uses an anonymous subclass of <code>ArrayList</code>, then adds the items in the subclass' constructor. However, I can't seem to remember the exact syntax.</p>