formartted string java

Java
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);  
Source

Also in Java: