code: private static void swap(byte[] array, int i, int j) {
          if (i != j) { 
              byte valAtI = array[i];
              array[i] = array[j];
              array[j] = valAtI;
              numSwaps++;
          }
      }
docs: Swaps the elements at positions i and j.