62,614
社区成员
发帖
与我相关
我的任务
分享
String result= "我的名字:%s ,性别:%s,年龄:%d";
System.out.println(String.format(result, "小明","男",20));
String str = "我的名字:{0} ,性别:{1},年龄:{2}";
System.out.println(MessageFormat.format(str, "小明","男",20));
String result= "我的名字:%s ,性别:%s,年龄:%d";
System.out.println(String.format(result, "小明","男",20));