title: Java What is difference between generic method and a method object as a parameter?
body: <p>What are advantage between a generic method and a method just accepts Object? How does it ensures type safety?</p>
  
  <p>For example: What difference does it make when define my interface in either of the form mentioned in below code snippet?</p>
  
  <pre><code>public interface MyInterface {
    public &lt;MT&gt; String myMethod(MT t);
  }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>public interface MyInterface {
    public String myMethod(Object t);
  }
  </code></pre>
  
  <p>In my opinion Generic methods are advantageous only when we type bound around it.. for example type parameter should of Serializable class like. Otherwise it doesn't make sense.. looking for more insight</p>
  
  <pre><code>public interface MyInterface {
    public &lt;MT extends Serializable&gt; String myMethod(MT t);
  }
  </code></pre>