I need in Java to convert a String
that has a binary value (Ex: "0111010") to a double
. I tested:
String teste = "101010101";
double number = Double.parseDouble(teste);
System.out.println("The number is: " + number);
But the output is a totally different hexadecimal number. I need the output to be the same content as String
. The double
can even point somewhere, without problems, but needs to keep the same binary and in the same order.