File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kevin Schneider
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i have an int=5, how do i get a string containing "101" representing the 5 in binary?
thanks
 
Kevin Schneider
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i figured it out:
Integer.toBinaryString(5)
thanks anyways
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic