就是用person.getName()的值去替换{0}
如果你的字符串中是
MessageFormat.format("xx{0}xx{1}xx{2}xxx...xxx{n}xxx",new Object[n]);这个代码就是用数组中按数组下标顺序去替换字符串中的{1...n}