Get two raw bytes from a single char
Size of char in Java is two bytes. How can I get raw bytes from a char variable? var ch = ‘文’; var b1 = // ? var b2 = // ? >Solution : You can perform bitwise arithmetic on char to access the individual bytes: var b1 = (byte) ch; var b2 = (byte)… Read More Get two raw bytes from a single char