Question: JAVA. Ask user for a word and check if it's a palindrome using a Stack data structure . * Your main class ( and only

JAVA. Ask user for a word and check if it's a palindrome using a Stack data structure.

* Your main class (and only class) will include the static method getInputWord, this will prompt the user and return their input as a String. Use Joptionpane.showinputdialog to receive the input.

* Use a second static method named palindromeCheck that will take the String as an input argument and return a Boolean which indicates if the String is a palindrome or not. This method will use a Stack data structure. Use charAt method of the String class for accessing each character of a word.

* Output the result to the screen using JOptionPane.showMessageDialog.

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!