Question: Write a program in Java to determine whether a string of characters entered from the keyboard is a palindrome, i.e. the string reads the same

 Write a program in Java to determine whether a string of

Write a program in Java to determine whether a string of characters entered from the keyboard is a palindrome, i.e. the string reads the same both forwards and backwards. The program should store user input into both a stack and a queue of characters. After all the characters are entered, compare the contents of the stack and queue using pop and dequeuer operations. If the contents are the same, the string reads the same forwards and backwards, thus it is a palindrome. If a mismatch is found, the string is not a palindrome. Note: The program should ignore the case of letters (i.e. 'a' and 'A' are the same) when comparing It should also ignore blanks and punctuation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!