Check whether given String is Palindrome or not in Java

This article will help you to understand Java Program to Check Palindrome.

Palindrome is a String or numeric value which remains same after reversing it. e.g. 12321, 345543, KANAK, MADAM etc. We can check if given string is palindrome or not by reverse it and then compare it with original string.

Java Program to Check Palindrome


Madam is Palindrome.

Now try some string, say “abcdef” which is not palindrome. It’s already given as commented in program.


abcdef IS NOT palindrome.

Leave a Reply

Your email address will not be published. Required fields are marked *