Some content modified from the Java Tutorials at http://java.sun.com/docs/books/tutorial/java/data/strings.html
Fundamentally, a String is a sequence of characters. The String class provides various methods to access portions of a String, but recall that Strings are immutable. That means that they do not change. To morph one String into another, you must use methods to create a new String object containing the new set of characters.
Following are several common methods that are fairly self-explanatory. Take a look at the String API for a bit more detail.
The split method can be used to divide a String into several substrings. It takes as input a regular expression denoting the how the string should be split and returns an array of Strings. In the simplest case, the expression is a character denoting the delimiter to be used. The following example splits the String around the colon. The result is an array of Strings - [a,b,c]. Note that the delimiter is removed from the result.
The list of escape sequences in Java is as follows:
In the preceding example, the string s will have the value "A number: 2".
To convert an int into a String without concatenating it with another string, use the valueOf method of the string class.
To convert a string to an Integer, use the parseInt method of the Integer class.