MessageFormat.format() takes an argument of type Object[] (an array of Object ), while you are passing one Object .
You will need to create an array from Integer :
MessageFormat format = new MessageFormat("{0}"); Object[] args = { Integer.toHexString(10) }; String result = format.format(args);
source share