This simply cannot be here:
Code:
public static int indexOfLetter(char theLetter)
{
int index = Character.toLowerCase (theLetter)-'a';
return index
}
That must be moved into your class.
Beyond this, you'll have a couple of other errors as well. One will be a compilation error, and the other will be a runtime error which is simply the placement of a closing brace. Since this is a homework assignment you should attempt to resolve these first, and come back if you have problems.
Another thing to note is that in Java, an int[] will always default to 0. So the loop to populate with 0 is actually optional. This differs from an Integer[] which defaults to null (like Object[]).
Also, in the future please wrap all code in [code][/code] or [php][/php] tags to preserve the formatting.