I have an array 

```
char[] A = {'a','c','e','b','d'};

```

I want to arrange the array in ascending order i.e

```
A ={'a','b','c','d','e'};

```

How it can be done in java as simple `>` operator will not give me correct answer.
code:

```
for(int i=A.length-1; i>=1;i--)
{
    if(A[i]<A[i-1])
    {
        char a =A[i];
        A[i] = A[i-1];
        A[i-1] = a;                          
    }
}

```