aspose file tools*
The moose likes Java in General and the fly likes Datatypes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Datatypes" Watch "Datatypes" New topic
Author

Datatypes

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
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
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Datatypes