How to override generic method java
<p>I have an interface which just contains one generic method:</p>

<pre><code>public interface Presenter {
    &lt;T&gt; void query(T queryParameter);
}
</code></pre>

<p>Now, I want to define a subclass of <code>Presenter</code> and I want the type to be <code>String</code>, just like this:</p>

<pre><code>public class IpQueryPresenter implements Presenter {
    void query(String queryParameter) {
         //do something here...
    }
}
</code></pre>

<p>How to define it ?</p>

<p>I saw all your answers define the type on the interface name, but is it a must ? Is it possible if I just want to define a generic method and override it ?</p>