Palindromes

This sample shows that a simple Java applet can read a string that is typed into an arbitrary field and perform a rudimentary analysis on it, reporting the "result" in an ongoing "log" file that tracks the user over an indefinite sequence of attempts.

Palindrome Icon A palindrome is any string of characters which reads "the same" whether it's read from left-to-right or from right-to-left.
For example: "Abba", or "Was it a bat I saw"? (which is a Palindrome only if you ignore spaces), or "Damn! I, Agassi, miss again! Mad!", (for which you also have to ignore Punctuation).

Type any string into the field below, and press <Enter> to trigger the Java applet which does the analysis as well as handling the user interaction...

Each time you click on one of the option checkboxes, there is an implicit re-evaluation of the current input string to see if it is a Palindrome given the new semantics. To get back to the input field you must click there to set focus before typing. Reloading the Applet resets all of the defaults to their initial values.

Click here to view the Java source for this simple applet.