title: Declare attribute of type that extends 2 different interfaces
body: <p>I would like to declare attribute that holds instance of class that implements 2 different interfaces. I have tried this syntax:</p>
  
  <pre><code>private &lt;? extends Interface1 &amp; Interface2&gt; name;
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>private &lt;T extends Interface1 &amp; Interface2&gt; T name;
  </code></pre>
  
  <p>None of those work. Is it possible? What's the syntax? I'm trying to avoid declaring another interface that inherits from both <code>Interface1</code> and <code>Interface2</code>.</p>
  
  <hr>
  
  <h2>Edit:</h2>
  
  <p>The class containing this attribute should not have any type arguments. That is nothing like this:</p>
  
  <pre><code>public class MyClass&lt;T extends Interface1 &amp; Interface2&gt;{
      private T name;
      ...
  }
  </code></pre>
  
  <p>It would not make any sense for those using the class. It is not expected neither logical not possible for that class to be generic.</p>