This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
I have int i; I want to extract the bits out the integer, then I want to check it bits on, if on then i want to put it's value into String. How can I do this? Thanks, Angela
posted 14 years ago
You can do that using a bitmask. Basically you do a bitwise AND with a mask, designed to pick out the one or more bits you're looking for. You can easily add numbers into Strings using the appropriate String constructor. --Mark