setBit static method

int setBit(
  1. int value,
  2. int bitNum
)

Set the specified bit.

Implementation

static int setBit(int value, int bitNum) {
  return value | (1 << bitNum);
}