String Methods
charAt()
length()
Goal:
Use charAt and length methods to access information in a String variable.
Steps:
- Create a String variable and initialize it with some characters (at least 3).
- Use the charAt method to print the 3rd character in the String (remember, computers start counting at zero).
- Use the length method to print how many characters are in the String.
- Use a for loop to examine each character in the String, and when you find one that matches the character you are looking for, print its index.