public void sort(int[] a){
        if (a==null || a.length==0)
        {
            return;
        }
        int length = a.length;
        for (int i = 0; i < length; i++)
        {
            for (int j = length-1; j>=i+1; j--)
            {
                if (a[j]<a[j-1])
                {
                    int temp = a[j];
                    a[j]=a[j-1];
                    a[j-1]=temp;
                }
            }
        }
    }