Question: Write a method called printPalindrome that accepts a Scanner for the console as a parameter, prompts the user to enter one or more words, and
Write a method called printPalindrome that accepts a Scanner for the console as a parameter, prompts the user to enter one or more words, and prints whether the entered String is a palindrome (i.e., reads the same forward as it does backward, like "abba" or "racecar ") .
For an added challenge, make the code case-insensitive, so that words like “Abba” and “Madam” will be considered palindromes.
Step by Step Solution
3.43 Rating (156 Votes )
There are 3 Steps involved in it
public static void print Palindrome Scanner console Systemoutprint Type one or ... View full answer
Get step-by-step solutions from verified subject matter experts
