Question: Write a java program which determines whether an input string is a palindrome or not. Your program should take into account letters only and ignore
Write a java program which determines whether an input string is a palindrome or not. Your program should take into account letters only and ignore nonalphabetic characters as well as consider letter case (uppercase or lowercase) immaterial in the determination. For example, the string "Madam, I'm Adam." will be considered a palindrome, even if its "reversed" form (which is ".madA m'l,madam") does not match exactly its original form. This is so since, if letter case and nonalphabetic characters are ignored, the string reduces to "MADAMIMADAM", which is the same read forwards and backwards.
Step by Step Solution
3.41 Rating (151 Votes )
There are 3 Steps involved in it
Answer public class PalindromeChecker public static boolean isPalindromeString str Remove nonalph... View full answer
Get step-by-step solutions from verified subject matter experts
