title: Checking flag bits java
body: <p>I have a problem with flag bits.
  I have an <code>int</code> variable to hold flags. First I set some flags to that variable. Later I need check how many flags were set in that variable. But I don't know to do it.</p>