java string format with placeholder

Java
String s = "hello %s!";
s = String.format(s, "world");
assertEquals(s, "hello world!"); // should be true
Source

Also in Java: