Strings are objects that do more than just store data. String objects also have methods that can manipulate and process the data stored in the string object. Listed below is a list of the many methods that work on strings. You have already used the "equals( )" method and now it's time to expand upon the usefulness of String objects in Java.
Listed below are some of the more commonly used methods that work on strings. A more complete list of methods that work on Strings can be found at the Sun Java site
METHOD EXAMPLE
charAt(int index)
Returns the character at the specified index.
char Y;
String X="abcd";
Y = X.charAt(2);
To extract ASCII codes from a String use this code:
String test = "ABCD";
char c;
for ( int i = 0; i < test.length(); ++i ) {
c = test.charAt( i );
int i = (int) c;
System.out.println(i);
}