Java Program – to check the number for Palindrome using a while loop.

Output: