除了String的replace方法和replaceAll
还有MessageFormat.
String str1 = "大秦 {0} {1} {2}";
System.out.println(MessageFormat.format(str1, "将军", "梦回", "秦朝"));
除了String的replace方法和replaceAll
还有MessageFormat.
String str1 = "大秦 {0} {1} {2}";
System.out.println(MessageFormat.format(str1, "将军", "梦回", "秦朝"));