title: Extending base class containing abstract generic method in java
body: <p>I am given a Base class like this:</p>
  
  <pre><code> Class MyBase{
  
     public abstract &lt;T&gt; Student assign (T object);
  
   }
  </code></pre>
  
  <p>I am extending it like below:</p>
  
  <pre><code> Class MyClass extends MyBase{
  
     @Override
     public abstract &lt;T&gt; Student assign (T object){
  
       Student stew = new Student();
       ......
  
     }
   }
  </code></pre>
  
  <p>My intended use is: the passed in object should be of type Teacher. Within the method I want to create a new Student which will get some values by invoking functions on Teacher. (For example, stew.setTeacherName = teacher.getName();) And then return Student to the caller. </p>
  
  <p>Questions:
  a) How do I get the intended behavior?
  b) Whats the difference between declaring MyBase the current way vs. doing MyBase ?
  c) I am interested in knowing the solution in case where I CAN change Base class and I CANNOT change the Base class.</p>
  
  <p>Thanks in advance for your help. Also, if there are any useful resources/tutorials you can point me to that would be great. Thanks again. </p>