Write a program to input the no. dynamically and sort the array.

class Sorting
{
            int temp=0,i,j;
            int a[]=new int[15];
            void process()
            {
                        for(i=0;i<5;i++)
                        {
                                    for(j=i+1;j<5;j++)
                                    {
                                                if(a[i]>a[j])
                                                {
                                                            temp=a[i];
                                                            a[i]=a[j];
                                                            a[j]=temp;
                                                }
                                    }                                  
                        }
                        for(i=0;i<5;i++)
                        {
                                    System.out.println(a[i]);
                        }
            }
            public static void main(String arg[])
            {
                        Sorting s=new Sorting();
                        int k;
                        for(k=0;k<5;k++)
                        {
                                    s.a[k] = Integer.parseInt(arg[k]);
                        }
                        s.process();    

            }