Amazon Interview Question

Write a Java program to reverse a number