1String a = "{YY}-{MM}-{SEQNO}";
2a = a.replace("YY", "17").replace("MM", "06").replace("SEQNO", "0001");
3System.out.println(a);
4//Output: {17}-{06}-{0001}
5
1String s = java.text.MessageFormat.format("I would like to have {0} KG of rice and {1} Litre of Milk. I only have ${2}, is this sufficient?",new String[]{"100","5","50"});
2System.out.println(s);
3