code: public static int[] intersection(final int[] a, final int[] b) {
          if (N.isNullOrEmpty(a) || N.isNullOrEmpty(b)) {
              return N.EMPTY_INT_ARRAY;
          }
  
          return IntList.of(a).intersection(IntList.of(b)).trimToSize().array();
      }
docs: Returns a new array with all the elements in <code>b</code> removed by occurrences.
  
  <pre>
  int[] a = {0, 1, 2, 2, 3};
  int[] b = {2, 5, 1};
  int[] c = retainAll(a, b); // The elements c in a will b: [1, 2, 2].
  
  int[] a = {0, 1, 2, 2, 3};
  int[] b = {2, 5, 1};
  int[] c = intersection(a, b); // The elements c in a will b: [1, 2].
  </pre>
  
  @param a
  @param b
  @return
  @see IntList#intersection(IntList)