title: How does Java handle arguments separated by |?
body: <p>How does Java handle arguments separated by | ?</p>
  
  <p>for example</p>
  
  <pre><code>private void foo(int i) {
      System.out.println(i);
  }
  
  private void bar() {
      foo(1 | 2 | 1);
  }
  </code></pre>
  
  <p>Which would give the output</p>
  
  <pre><code>3
  </code></pre>
  
  <p>I've seen this used in SWT/JFace widget constructors. What I can't figure out is how the value of <code>i</code> is decided.</p>