cast int to hex java code example Example: convert int to hex java Click to copyint integer = 18; String hexString = Integer.toHexString(integer);