Java Program to reverse the number.

Output of reversing a number: