title: What does the |= operator do in Java?
body: <p>While reading the <a href="http://developer.android.com/guide/topics/ui/notifiers/notifications.html" rel="noreferrer">Android guide to Notifications</a>, I stumbled across this:</p>
  
  <blockquote>
    <p><strong>Adding vibration</strong></p>
    
    <p>You can alert the user with the the default vibration pattern or with a
    vibration pattern defined by your application.</p>
    
    <p>To use the default pattern, add "DEFAULT_VIBRATE" to the defaults field:</p>
  
  <pre><code>notification.defaults |= Notification.DEFAULT_VIBRATE;
  </code></pre>
  </blockquote>
  
  <p>What this does is clear: it adds the <code>DEFAULT_VIBRATE</code> flag to the default flags of the notification object.
  But what does the <code>|=</code> operator do in Java? 
  It looks like an "OR", but how does it work? </p>
  
  <p>Can you provide an example using numbers?</p>
  
  <p>Thanks</p>