title: Below code where (? extends aClass) is used has confused me
body: <p>As per my understanding(which needs correction obviously) the map should take Integer class and all of its sub classes. and same with Location class. </p>
  
  <pre><code>Map&lt;? extends Integer, ? extends Location&gt; test2 = new HashMap&lt;&gt;();
  test2.put(new Integer(5), new Location(1, "Test2", exits));
  </code></pre>
  
  <p>I have watched and read from many different resources. But I still can't get my head around this. 
  I am not a professional programmer.</p>