formartted String java
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);
Pable Sorren
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);
/* Common Format Specifiers
*
* %s - String value
* %d - Integer value
* %f - Decimal value (floating point)
* %x - Hextstring value from integer
*
*/
String.format("String with format specifiers here: %d %s %f %x", 10, "input", 2.7, 26);