title: I though I knew everything about Enum but how does this work
body: <p>I though I knew everything about Enum but how does this work</p>
  
  <p>(thanks to <a href="https://github.com/srym/FirebaseRealTimeChat" rel="nofollow noreferrer">Fumihiko Shiroyama</a> for the code</p>
  
  <pre><code>/**
   * Message Type
   *
   * @author Fumihiko Shiroyama (fu.shiroyama@gmail.com)
   */
  public enum MessageType {
      NORMAL(1 &lt;&lt; 7), IMAGE(1 &lt;&lt; 8);
  
      private int flag;
  
      MessageType(int flag) {
          this.flag = flag;
      }
  
      public int getFlag() {
          return flag;
      }
  }
  </code></pre>
  
  <p>Especially how does the >> work here?</p>