title: JAVA: override interface method
body: <p>I have interface:</p>
  
  <pre><code>interface operations{  
      void sum();  
  }   
  </code></pre>
  
  <p>and I want to have classes:    </p>
  
  <pre><code>class matrix implements operations {  
      @override   
      void sum(matrix m) {  
      } 
  }
  
  class vector3D implements operations {  
      @override  
      void sum(vecor3D v) {  
      }
  }
  </code></pre>
  
  <p>How to do this?
  I tried something like this:</p>
  
  <pre><code>interface operations &lt; T &gt; {  
      &lt;T&gt; void sum(T t);  
  }
  
  class matrix implements operations&lt;matrix&gt;{
      @Override
      void sum(matrix m){};
      }
  }
  
  class vector3D implements operations&lt;vector3D&gt;{
      @Override
      void sum(vector3D v){};
  }
  </code></pre>
  
  <p>but it doesn't work.    </p>