String text="hello {0},hehe{1}";
MessageFormat mf=new MessageFormat(text);
String value=MessageFormat.format(new Object[]{"adobe","goole"});
System.out.println(value);
// hello adobe ,hehe google
java格式化MessageFormat{0},{1}
最新推荐文章于 2023-01-04 16:25:19 发布