Double kb = new Double(3.5); Date today = new Date(); String pattern = "{0}K was deleted on {1}."; Object[] arguments = { kb, today }; System.out.println(MessageFormat.format(pattern, arguments));