class Demo13
{
public static void main(String[] args)
{
char[] arr = {'a', 'b', 'c', 'd', 'e'};
chang(arr);
}
public static void chang(char[] arr)
{
char temp;
int i;
int min = 0;
int max = arr.length - 1;
for(; min < max; ++min, --max)
{
temp = arr[min];
arr[min] = arr[max];
arr[max] = temp;
}
for(i = 0; i < arr.length; ++i)
{
System.out.print(arr[i] + ", ");
}
}
}