title: Members of a Intersection type
body: <p>This question is related to : <a href="https://stackoverflow.com/questions/24693369/compilation-error-lamba-target-type-intersection-type">Lambda Intersection Type Question</a></p>
  
  <p>Please see the example:</p>
  
  <pre><code>public class X {
    Object o = (I &amp; J) () -&gt; {};
  }
  interface I {
     public void foo(); 
  }
  interface J {
     public void foo();
     public void bar(); 
  }
  </code></pre>
  
  <p>I am trying to understand what are the members of the intersection type. Please see:
  <a href="http://docs.oracle.com/javase/specs/jls/se5.0/html/typesValues.html#108433" rel="nofollow noreferrer">JLS</a>.</p>
  
  <p>It is not clear from the last statement:</p>
  
  <blockquote>
    <p>Then the intersection type has the same members as a class type (§8) with an empty body, direct superclass Ck and direct superinterfaces IT1 , ..., ITn, declared in the same package in which the intersection type appears.</p>
  </blockquote>
  
  <p>It is not clear if the members of the intersection type are (union) all the members of all the superclass Ck and super interface ITk or it is really a intersection of all the members of supeclass Ck and superinterface ITk.</p>