Java Program – to reverse the number.

Output: