Java Bit Set setBit(int integer, int bit)

Here you can find the source of setBit(int integer, int bit)

Description

set Bit

License

Open Source License

Declaration

static public int setBit(int integer, int bit) 

Method Source Code

//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*/
}

Related

  1. setBit(int f, int i)
  2. setBit(int flag, int i)
  3. setBit(int flags, int bit)
  4. setBit(int i, int bit, boolean enabled)
  5. setBit(int i, int bit, boolean state)
  6. setBit(int mask, int bit, boolean value)
  7. setBit(int n, int bitPosition)
  8. setBit(int position, boolean value, int meta)
  9. setBit(int position, byte[] array)