Two interfaces specify methods with the same signature, but specified to have different behavior?
<p>I have some class <code>public class myClass implements A, B</code> where A and B both contain a method  <code>public int doSomething();</code>, but <code>A.doSomething</code> is specified by the interface to do something different than <code>B.doSomething</code>.</p>

<p>I have read <a href="http://stackoverflow.com/questions/9863835/two-interfaces-with-same-method-signature-implemented-in-java-class">Two interfaces with same method signature implemented in Java class</a>, but that doesn't really address my problem, because the methods are overriden to do the same thing, but as I said above, my question is about when they are specified in the interfaces to do different things.</p>

<p>For example, suppose <code>A.doSomething()</code> is supposed to return <code>0</code>, while <code>B.doSomething()</code> is supposed to throw an exception, and violating either one wold cause problems for methods that are supposed to take them as parameters.</p>

<p>Is there any way to do this in java?  If so, how would one actually do it?</p>
