Java program to check if a number is palindrome or not