Originally posted by Ravindranath Chowdary:
Hi,
I can't able to get the int from the binary with the
convertToBinary("10001000001001");
Can you please clear my doubt.
Thanks,
Ravindranath.
First, If you read the previous post again, you'll notice that it is Pseudo Code, and that
you should look at Integer.parseInt() for more information.
Second, please don't do this... To create a new string object, which is then parsed, just because you want to be able to read binary in the source code is silly. Most developers just get comfortable with reading hexidecimal. (Not to mention that you will probably be challenged at your next code review for doing this)
Henry