I have a hex code in string example
String a="0x52";
I want to store this hex value in a byte example
byte b=(do something with a so i can store it in b);
so byte b is going to store 0x52
How to achieve this ?
Just for reference my teacher gave this sample code
public byte[] CONSIGNMENT_0 = { 0x52, 0x44, 0x54, 0x30, 0x31, 0x9, 0x6f, 0x6e,
0x65, 0xa, 0x32, 0x9, 0x74, 0x77, 0xa, 0xd };
And its working perfectly so we can store 0x52 in a byte variable.