Program to clear K | Java program to clear K - th bit of a number N ; Function to clear the kth bit of n ; Driver code
class GFG { static int clearBit ( int n , int k ) { return ( n & ( ~ ( 1 << ( k - 1 ) ) ) ) ; } public static void main ( String [ ] args ) { int n = 5 , k = 1 ; System . out . println ( clearBit ( n , k ) ) ; } }