I am still having an exceptional amount of trouble with java. This is my new assignment, if anyone can help I would greatly appreciate it. I don't even know where to start.
A word or phrase in which the letters spell the same message when written forward and backward (with whitespaces and punctuations not considered) is called a palindrome.
Write a simple Java program that detects palindromes. Your program should be named "PalindromeDetector.java", and the class in it should be named "PalindromeDetector".
The program should first ask for the input text:
Input text? user input
If the entered text is a palindrome, display the message:
This is a palindrome.
Otherwise display:
This is not a palindrome.
Notice that whitespaces and punctuations not considered; cases of characters don't matter, either. Thus the strings "ab, a " and "Was it a cat I saw?" are both palindromes. You can assume that the user input only possibly includes the following four punctuation marks:
, . ! ?