How to find Palindrome in Java

Posted on Updated on

Palindrome

It means a number or string remains same even if it is reversed/flipped. Let’s see how can we implement concept of palindrome for number and string as well.

Palindrome number:

Output

Palindrome String:

Output

We saw in above examples a method returns true if given number or string is Palindrome and false if it’s not palindrome.

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.