The example shows the output with String concatenation
TextTerminal terminal = textIO.getTextTerminal();
terminal.println("\nUser " + user + " is " + age + " years old, " +
"was born in " + month + " and has the password " + password + ".");
It would be easier to read if there is a printf method
TextTerminal terminal = textIO.getTextTerminal();
terminal.printf(
"\nUser %s is %s years old, was born in %s and has the password %s.",
user, age, month, password
);
The example shows the output with String concatenation TextTerminal terminal = textIO.getTextTerminal(); terminal.println("\nUser " + user + " is " + age + " years old, " + "was born in " + month + " and has the password " + password + ".");
It would be easier to read if there is a printf method TextTerminal terminal = textIO.getTextTerminal(); terminal.printf( "\nUser %s is %s years old, was born in %s and has the password %s.", user, age, month, password );