subsection contents

Palindrome Testing Applet

Sorry, this applet requires a Java-enabled browser.

What is a palindrome? A palindrome is a word or phrase which reads the same forward or backward. Here are some examples: "radar", "Abba", "Madam, I'm Adam"

This little applet let's you type in a phrase and then analyzes it to see if it is a palindrome. Spaces and some punctuation marks are ignored, as are differences in case. Therefore, "A man, a plan, a canal: Panama" is a valid palindrome.

To use the applet, just type a phrase in the 'Input' area, and either hit Return or click on the 'Test for Palindrome' button. The verdict will be displayed in the middle of the applet's display area.

Some more example palindromes:
  • "Able was I ere I saw Elba"
  • "Pa made Ed a map"
  • "kayak""Ada""Glenelg" (a suburb in Adelaide)
  • the trivial cases of a blank, a single character, or a string of identical characters

Source code:

Last updated: July 18, 2000