public class Palindrome
extends java.lang.Object
Palindrome Java application illustrates the use of a stack
and a queue in the same program to determine whether a line is a
palindrome. The program ignores everything except alphabetic letters, and it
ignores the difference between upper- and lowercase letters.
Java Source Code for this class: http://www.cs.colorado.edu/~main/applications/Palindrome.java
| Constructor and Description |
|---|
Palindrome() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
is_palindrome(java.lang.String input)
Determine whether a string is a palindrom.
|
static void |
main(java.lang.String[] args)
The main method prompts the user for a strings.
|
public static void main(java.lang.String[] args)
args - not used in this implementationpublic static boolean is_palindrome(java.lang.String input)
input - the string to check