Palindrome

How do you know if a string is a palindrome or not?

Now , first let's see what is a palindrome. The answer to this is ,

"A string is a palindrome if it is the same when seen from left to right and right to left"

Example: DAD , MADAM are plaindrome , because the are same if we read then fron to back or back to front.

 So how can we check if a given string is a palindrome in java. Let's see  with the example code below:




Palindrome:


Palindrome