... charAt takes an index andreturns the character at that index. indexOf takes a character and finds theindex where that character appears.charAt fails if the index is out of range, and causes an ... in a program are called thestate. Diagrams like this that show the state of the program are called statediagrams. As the program runs, the state changes, so you should think of a state diagram ... them.8.2 PackagesThe built-in Java classes are divided into a number of packages, includingjava.lang, which contains almost all of the classes we have seen so far, andjava.awt, which contains classes...