Answers for "replacing string with dynamic avalues java"

0

replacing string with dynamic avalues java

String a = "{YY}-{MM}-{SEQNO}";
a = a.replace("YY", "17").replace("MM", "06").replace("SEQNO", "0001");
System.out.println(a);
//Output:  {17}-{06}-{0001}
Posted by: Guest on January-11-2021
0

replacing string with dynamic avalues java

System.out.printf("%S-%S-%S\n", ""+17, ""+06, ""+0001);
Posted by: Guest on January-11-2021
0

replacing string with dynamic avalues java

String 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"});
System.out.println(s);
Posted by: Guest on January-11-2021

Code answers related to "replacing string with dynamic avalues java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language