Here you can find the source of clearBits(int value, int bits)
Parameter | Description |
---|---|
value | value |
bit | bit or bit set to clear in the value |
value
with cleared selected bits
public static int clearBits(int value, int bits)
//package com.java2s; /**// ww w . j a v a 2 s . co m * @licence GNU Leser General Public License * * $Id$ * $HeadURL$ */ public class Main { /** * Clear selected bit(s) in giving value * * @param value value * @param bit bit or bit set to clear in the value * @return <code>value</code> with cleared selected bits */ public static int clearBits(int value, int bits) { return value & ~bits; } }