title: Java generics - The type parameter String is hiding the type String
body: <p>In my interface:</p>
  
  <pre><code>public &lt;T&gt; Result query(T query)
  </code></pre>
  
  <p>In my 1st subclass:</p>
  
  <pre><code>public &lt;HashMap&gt; Result query(HashMap queryMap)
  </code></pre>
  
  <p>In my 2nd subclass:</p>
  
  <pre><code>public &lt;String&gt; Result query(String queryStr)
  </code></pre>
  
  <p>1st subclass has no compilation warning at all while 2nd subclass has:
  The type parameter String is hiding the type String? I understand my parameter is hidden by the generics type. But I want to understand underneath what exactly happened?</p>