Strings interpolation in Java
Forums:
int fontSize = 14;
String fontFamile = "Arial";
String style = String.format(
"font-size: %d;font-family: %s",
fontSize, fontFamile);
//style is "font-size: 14;font-family: Arial"
- Log in to post comments