title: How to extends HashMap to allow String, String types
body: <p>I need to create a custom class that extends java.util.LinkedHashMap and takes String as key and String as value and has a no-arg constructor that pre-populates this map with initial values.</p>
  
  <p>I am stuck at the first task - how to extend the LinkedHashMap in such a way that instead of generic arguments it accepts  only?</p>
  
  <p>I tried this, (not working)</p>
  
  <pre><code>import java.util.LinkedHashMap;
  
  @SuppressWarnings("serial")
  public class MyMenu&lt;String, String&gt; extends LinkedHashMap&lt;String, String&gt; {
  
  
      public MyMenu(){
          this.put("index.jsp", "Home Page");
      }
  }
  </code></pre>