JAVA Write a java program that takes a string as input from the user and finds out if the string is a palindrome or not. A string is a palindrome if it reads the same from forward as well as from...


JAVA


Write a java program that takes a string as input from the user and finds out if the string is a palindrome or not. A string is a palindrome if it reads the same from forward as well as from backward. For example, the string “madam” is a palindrome. Use a for loop to solve this problem.




Sample inputs and outputs:



Input: madam


Output: palindrome



Input: Dad


Output: palindrome



Input: hello


Output: not a palindrome




Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here