title: Array initializer is not allowed here when passing as an argument to ArrayList
body: <p>I have some <code>Model</code> classes that I am trying to declare a list with them but I get <code>Array initializer is not allowed here</code>. What would be a simple work around?</p>
  
  <pre><code>...
  public class M1 extends Model {}
  public class M2 extends Model {}
  
  ...
  List&lt;Model&gt; mObj = new ArrayList&lt;Model&gt;({M1, M2}) //expression expected
  ...
  </code></pre>