How can I convert double to byte array in Java? I looked at many other posts, but couldn\'t figure out the right way.
Input = 65.43 byte[] size = 6 precisi
double doubleValue = 10.42123; DecimalFormat df = new DecimalFormat("#.##"); String newDouble = df.format(doubleValue); byte[] byteArray = (newDouble.replace(",", "")).getBytes(); for (byte b : byteArray) { System.out.println((char)b+""); }