+ 11
How to convert a decimal number into octal, hexadecimal, binary and also others in java?
25 Answers
+ 11
I've made Dec-Bin but in C++. So you can do it too :P No problem, whenever you need smth
+ 11
Than, do it in Java as well
+ 10
Integer.toString(x, 2) - decimal to binary
Integer.toString(x, 8) - decimal to octal
Integer.toString(x, 16) - decimal to Hex
+ 9
Like what?
+ 9
Well... I think there are no built-in functions for those... You can always write a function on your own :P
+ 8
C++?
+ 8
I think that there's a function, which automaticly converts the numbers, but maybe I'm wrong
+ 7
thank you so much Ms. Bindra.
One more thing, how to take a string in this program as input instead of fixing 13 as input?
+ 7
these answers are perfect for me.
because I wanna to learn basic Java only.
I like C or C++ more.
+ 5
sorry for that nonsense question, but I don't like Java. but it is in our syllabus. that's the reason why I'm leaning it.
+ 4
I think you are right because most of the things are predefined in Java
+ 4
I got it
+ 4
is their other functions for other conversions?
+ 4
I can it make it again
well thanks bro.
For helping me.
+ 4
I have also made it in C language in many ways.
+ 4
brother, is their any function in Java to concert string to decimal or other base numbers?
+ 3
in java
+ 3
O2D, O2H, O2B ...
+ 3
I think, Java needs to be redesigned?
what you think friends?
+ 3
why you are leaning Java?