I have converted a decimal number to binary using
int k=8;
String toBinaryString = Integer.toBinaryString(k);
After some manipulation I want the int value back. Can anyone help me with the function or do I have to convert it using loops only.
You can use:
int originalValue = Integer.parseInt(toBinaryString , 2));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With