code: public static void swap(char[] charArray1, int array1Index, char[] charArray2, int array2Index) {
          if(charArray1[array1Index] != charArray2[array2Index]) {
              char hold = charArray1[array1Index];
              charArray1[array1Index] = charArray2[array2Index];
              charArray2[array2Index] = hold;
          }
          
      }
docs: Swap the elements of two char arrays at the specified positions.
  
  @param charArray1 one of the arrays that will have one of its values swapped.
  @param array1Index the index of the first array that will be swapped.
  @param charArray2 the other array that will have one of its values swapped.
  @param array2Index the index of the second array that will be swapped.