I have the following code:
public static String dumpHex(byte... hex) {
String format = "$";
for (int i = 0; i < hex.length; i++) {
format += "%02X ";
}
return String.format(format,hex);
}
My methods takes varargs and String.format too. But this gives me a IllegalFormatConversionException. How do I solve this ?