Description:
 A palindrome number is a number such that if we reverse it, it will not change. For example some palindrome numbers examples are 121, 212, 12321, -454.
Learn through my videos:

Program:
package palindrom;
public class Palindrom 
{
 public static void main(String[] args)
 {
        int n=121,r,s=0;
        int t=n;
        while(n>0)
        {
            r=n%10;
            n=n/10;
            s=s*10+r;
        }
        if(t==s)
        {
            System.out.println("Number is a palindrom");
        }
        else            
        {
            System.out.println("Number is not a palindrom");
        }        
    }    
}
Output:
Number is a palindrome
Logic:
1)Get the number to check for palindrome.
2)Hold the number in temporary variable.
3)Reverse the number.
4)Compare the temporary number with reversed number.
5)If both numbers are same, print "palindrome number".
6)Else print "not palindrome number".