code: public static void swap(int[] intArray1, int array1Index, int[] intArray2, int array2Index) {
          if(intArray1[array1Index] != intArray2[array2Index]) {
              int hold = intArray1[array1Index];
              intArray1[array1Index] = intArray2[array2Index];
              intArray2[array2Index] = hold;
          }
          
      }
docs: Swap the elements of two int arrays at the specified positions.
  
  @param intArray1 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 intArray2 the other array that will have one of its values swapped.
  @param array2Index the index of the second array that will be swapped.