code: public static int[] commonElements(int[] arra, int[] arrb) {
  
          int[] c = null;
          int   n = countCommonElements(arra, arrb);
  
          if (n > 0) {
              c = new int[n];
  
              int k = 0;
  
              for (int i = 0; i < arra.length; i++) {
                  for (int j = 0; j < arrb.length; j++) {
                      if (arra[i] == arrb[j]) {
                          c[k++] = arra[i];
                      }
                  }
              }
          }
  
          return c;
      }
docs: Returns an int[] containing elements shared between the two arrays
  arra and arrb. The arrays contain sets (no value is repeated).
  
  Used to find the overlap between two arrays of column indexes.
  Ordering of the result arrays will be the same as in array
  a. The method assumes that each index is only listed
  once in the two input arrays.
  <p>
  e.g.
  </p>
  <code>
  <table width="90%" bgcolor="lightblue">
  <tr><td colspane="3">The arrays</td></tr>
  <tr><td>int []arra</td><td>=</td><td>{2,11,5,8}</td></tr>
  <tr><td>int []arrb</td><td>=</td><td>{20,8,10,11,28,12}</td></tr>
  <tr><td colspane="3">will result in:</td></tr>
  <tr><td>int []arrc</td><td>=</td><td>{11,8}</td></tr>
  </table>
  
  @param arra int[]; first column indexes
  @param arrb int[]; second column indexes
  @return int[] common indexes or <code>null</code> if there is no overlap.