public class BitwiseGETithBit { public static int getibit(int n, int i){ int bitmask = 1<<i; if((n&bitmask)==0){ return 0; } else{ return 1; } } public static void main(String[] args) { System.out.println(getibit(5,2)); } }
rishav9250 / bitwisegetithbit Goto Github PK
View Code? Open in Web Editor NEWhere is a code of BitwiseGETithBit in java.