Here you can find the source of setBit(byte b, int pos)
Parameter | Description |
---|---|
b | a parameter |
pos | a parameter |
public static byte setBit(byte b, int pos)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww . ja v a 2 s. c o m*/ * * @param b * @param pos * @return */ public static byte setBit(byte b, int pos) { return (byte) (b | (1 << pos)); } }