title: List of heterogeneous elements
body: <p>Why doesn't the following code give an error when I am trying to add two elements of different types in one list?</p>
  
  <pre><code>List list1 = new ArrayList&lt;&gt;();
  list1.add(1);
  list1.add("1");
  </code></pre>