title: What's the right way to design my interface when I have operations that aren't supported by all implementers?
body: <p>I have an Interface and two Classes which are implementing the Interface.</p>
  <pre><code>public interface MyInterface {
      public void firstMethod();  
      public int secondMethod();
  }
  
  public class MyClass1 implements MyInterface  {
      public void firstMethod() {}
  }
  
  public class MyClass2 implements MyInterface  {
      public void firstMethod() {}
      public int secondMethod() {}
  }
  </code></pre>
  <p>The class <code>MyClass1</code> is telling me to <code>Add unimplemented methods</code>, because the <code>secondMethod</code> is not implemented, OK I will do that. But the problem is that I don't need this method in <code>MyClass1</code>.</p>
  <p>In your opinion what is the best thing to do?</p>
  <ol>
  <li>Add the unimplemented method with something like <code>return 0</code></li>
  <li>There is another way to fix this if I don't want to implement it.</li>
  </ol>