wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes convert int to a string of 1's and 0's ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "convert int to a string of 1 Watch "convert int to a string of 1 New topic
Author

convert int to a string of 1's and 0's ???

Kevin Schneider
Greenhorn

Joined: Oct 16, 2003
Posts: 10
if i have an int=5, how do i get a string containing "101" representing the 5 in binary?
thanks
Kevin Schneider
Greenhorn

Joined: Oct 16, 2003
Posts: 10
i figured it out:
Integer.toBinaryString(5)
thanks anyways
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: convert int to a string of 1's and 0's ???
 
Similar Threads
How to convert integer variable to string representation
A Programming Interview Question
Turning an Int into a String
int VS Integer
outputting a number in binary form