title: cannot infer type arguments for ArrayList<>
body: <p>I'm trying to make an ArrayList that contains an object of another class, a name, and turn. something similar to the python's dictionary.</p>
  
  <pre><code>self.user1 = {"user":user1,"name":empty,"turn":empty}
  </code></pre>
  
  <p>so I made a class that has the 3 values.</p>
  
  <pre><code>class User{
  public userInterface user1;
  String name;
  String turn;
  
  public User(UserInterface user1,String name,String turn) {
      this.user1=user1;
      this.name=name;
      this.turn=turn;
  }}
  </code></pre>
  
  <p>and I'm trying to call it in the constructor of main class as following:</p>
  
  <pre><code>public class MainClassConstructon{
  ArrayList&lt;User&gt; user1;
  ArrayList&lt;User&gt; user2;
  
  MainClassConstructon(UserInterface user1 ,UserInterface user2){
       this.user1 = new ArrayList&lt;&gt;(new User(user1,empty, empty));
       this.user2 = new ArrayList&lt;&gt;(new User(user2,empty, empty));
  </code></pre>
  
  <p>but it raises an error saying that: cannot infer type arguments for ArrayList&lt;>.</p>