title: Multiple inheritance on Java interfaces
body: <p>I thought multiple inheritance was always illegal in Java, but this code compiles:</p>
  
  <pre><code>public interface A {
    void a();
  }
  
  public interface B {
    void b();
  }
  
  public interface AB extends A, B {
  }
  </code></pre>
  
  <p>Would having an empty interface such as <code>AB</code> be considered a bad practice? Is there a way to achieve something similar while avoiding the empty interface (using generics or otherwise)?</p>
  
  <p>Note: I'm not asking how to simulate multiple inheritance via interfaces. I realize I could do the following:</p>
  
  <pre><code>public class AbImpl implements A, B {
    public void a() {}
    public void b() {}
  }
  </code></pre>
  
  <p>For various reasons I need an interface that has both methods.</p>