Java Char to Zero Padded Hex Jul 11, 2006 <1 min read Integer.toHexString(0x100 | (int) 'f').substring(1).toUpperCase(); // 'f' is '0C' in hex #char #hex #padding #zero