Chapter

Arrays of Strings

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How can StringBuilder be used to format a name?

    "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 Stri

  2. How can you compute a substring of a string?

    "There are two methods that allow you to compute a substring of a string. The first allows you to specify a beginning index with the entire remainder of the string being included in the returned strin

  3. How are arrays of strings used in Java?

    "We often need to deal with collections of strings. In Java, we can define arrays of strings. Indeed, we’ve seen arrays of strings before. In a Java class’s main() method, command line arguments are p

Arrays of Strings | ComputerScienceOne | Bifalgorithm | Bifalgorithm