title: Java Parametrized method explanation
body: <p>I would like to implement a Generic method inside a <code>CommonInterface</code> to implement it with different parameters and return Type.</p>
  <p>Therefore I have:</p>
  <pre><code>public interface Common {
    public &lt;T, N&gt; T call(N n);
  }
  </code></pre>
  <p>If I understand well Generics logic (maybe not..) the call method return a Type T and receive as parameter a Type N. Therefore:</p>
  <pre><code>public class Class implements Common {
  
    @Autowired private SomeService someService;
     
    @Override
    public &lt;ClassDTO, Integer&gt; ClassDTO call(Integer id) {
        String s = someService.doSome(id); // suppose doSome receive an Integer as param
    }
  }
  </code></pre>
  <p>DoSome method is a simple method that receive as input parameter an Integer:</p>
  <pre><code>@Service
  public class SomeService {
  
   // some @Autowired other service
  
     public String doSome(Integer id) {
       // some operation
  
     }
  }
  </code></pre>
  <p>I receive an error on doSome(id) call who said me:</p>
  <pre><code>The method doSome(java.lang.Integer) in the type SomeService is not applicable for the arguments (Integer)
  </code></pre>
  <p>It's like if:</p>
  <pre><code>public &lt;ClassDTO, Integer&gt; ClassDTO call(Integer id) {
  }
  </code></pre>
  <p>The <code>Integer</code> above is not recognized as <code>java.lang.Integer</code>. I try to put <code>java.lang.Integer</code> as follows:</p>
  <pre><code>public &lt;ClassDTO, java.lang.Integer&gt; ClassDTO call(Integer id) {
  }
  </code></pre>
  <p>but obtains other errors..</p>
  <p>What's wrong??</p>