Write an application that takes a number from keyboard and display the digit of the number in reverse order.

import javax.swing.JOptionPane;
class Reverse1
{
    public static void main(String args[])
    {
        String st;
        int n,a=0;
        st=JOptionPane.showInputDialog("Enter any number: ");
        n=Integer.parseInt(st);
        for(int i=0;i<st.length();i++)
        {
            int m=n%10;
            a=a*10+m;
            n=n/10;
        }
        JOptionPane.showMessageDialog(null,"The reverse number is: "+a);
    }
}