Hi,
I have a boolean array of size 8 and need to store it in the form of a byte (8 bits).
Actually I only know how to convert from string[] to byte. So I need first go from bool[] to string[] and then to byte.
String number = "01010010"; //the bin way
byte numberByte = (byte) Integer.parseInt(number, 2); //so mode 2
System.out.println(numberByte);
Any one have a suggestion, how to convert bool[8] to a byte?
Edited by: 807586 on Nov 29, 2010 12:48 PM
Edited by: 807586 on Nov 29, 2010 12:48 PM