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

1 Expert Approved Answer
Step: 1 Unlock

public static void print Palindrome Scanner console Systemoutprint Type one or ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Building Java Programs A Back to Basics Approach Questions!