Goto
Java 22 String API and look at the methods that are built into the String type. The following are a few of the most commonly used in this couse.
- - initialize via assignment vs. constructor
- String s = "Foobar"; // goes into the String pool (explained later)
- String s = new String( "Foobar" ); // goes into the heap (explained later)
- - shortcut concatenation -
- s += " baz"; // s is now --> "Foobar baz"
- - built in methods -
- length()
- indexOf()
- charAt()
- startsWith()
- endsWith()
- equals()
- toUpperCase(), toLowerCase()
- vauleOf() (int, float, double etc.)
- substring()
- toCharArray()
There is another object, the Character object which is the "big brother" of the char type.
See here
Here is a program Strings.java that demonstrate some of the built in String operations.

