1]. DSA/3]. 450 DSA by ( Love Babbar Bhaiya )/Java/15]. Bit Manipulation/_01)_0_Count_SetBit.java
<reponame>Rau379/The-Complete-FAANG-Preparation<gh_stars>0import java.util.*;
import java.io.*;
public class CountSetBitsInInteger {
	
	static int countSetBits(int n) { 
		int setBits = 0;
		while(n!=0) {
			setBits++;
			n&=(n-1);
		}
		return setBits;
	}

	public static void main(String[] args) {

		int n = 10;
		
		System.out.println(countSetBits(n));

	}

}
