Here you can find the source of setBit(int integer, int bit)
static public int setBit(int integer, int bit)
//package com.java2s; //License from project: Open Source License public class Main { static public int setBit(int integer, int bit) { return (integer | (1 << bit)); }/* w ww.j a v a2s . co m*/ }