1.char chCharacter = 'A';
2.int iBinaryCode;
- Storing the character in a char
- Where I want to store the binary value
1.char chCharacter = 'A';
2.int iBinaryCode;
You can get a String with its binary value as follows
Integer a = Character.getNumericValue(chCharacter);
String binary = Integer.toBinaryString(a)
EDIT: and get it as an Integer doing:
Integer binaryInteger = Integer.valueOf(binary);