Convert char to hexadecimal in Java
char a = '0'; String hexStr = Integer.toHexString(a); System.out.println(hexStr);