Write a java program to check whether a string is a palindrome.
Write a java program to check whether a string is a palindrome.
134
22-Mar-2023
Aryan Kumar
19-Apr-2023Chnaged Data
Gulshan Negi
07-Apr-2023Hello this is Gulshan Negi
Well, here is the program that you should try.
I hope it will help you.
Thanks
Krishnapriya Rajeev
23-Mar-2023Given below is a code to check whether a given string is palindrome or not.
Here, we reverse the given string and store it in another string object. Then, we check each letter of both the given string and reversed string. If the characters are not the same at any point, we set flag = 0 and breaks from the loop.