private void swap(char str[],int index1,int index2){
        char temp = str[index1];
        str[index1] = str[index2];
        str[index2] = temp;
    }
http://www.geeksforgeeks.org/an-in-place-algorithm-for-string-transformation/
src/com/interview/string/InPlaceTransformationOfString.java