Concept
How can StringBuilder be used to format a name?
ComputerScienceOne / Arrays of Strings
"String firstName = \"Tom\";\n\nString lastName = \"Waits\";\n\nString formattedName = new StringBuilder(lastName)\n\n.append(\", \")\n\n.append(firstName)\n\n.toString();\n\nYou can also use the StringBuilder class yourself directly."
Related Ideas
- How are arrays of strings used in Java?ComputerScienceOne · Arrays of Strings
- How can you create an array of strings in C?ComputerScienceOne · Arrays of Strings
- How can you create static strings with character arrays?ComputerScienceOne · Character Arrays
- How can you define arrays of strings in PHP?ComputerScienceOne · Arrays of Strings
- How can strings be created and assigned to variables?ComputerScienceOne · Basic Operations