public static boolean[] join(boolean[] arrayA,boolean... arrayB){
  if ((arrayB == null) || (arrayB.length == 0)) {
    return arrayA;
  }
  if ((arrayA == null) || (arrayA.length == 0)) {
    return arrayB;
  }
  boolean[] array=new boolean[arrayA.length + arrayB.length];
  System.arraycopy(arrayA,0,array,0,arrayA.length);
  System.arraycopy(arrayB,0,array,arrayA.length,arrayB.length);
  return array;
}

public static boolean [ ] join ( boolean [ ] arrayA , boolean ... arrayB ) { if ( ( arrayB == null ) || ( arrayB . length == 0 ) ) { return arrayA ; } if ( ( arrayA == null ) || ( arrayA . length == 0 ) ) { return arrayB ; } boolean [ ] array = new boolean [ arrayA . length + arrayB . length ] ; System . arraycopy ( arrayA , 0 , array , 0 , arrayA . length ) ; System . arraycopy ( arrayB , 0 , array , arrayA . length , arrayB . length ) ; return array ; }
joins 2 arrays together , if any array is null or empty then other array will be retuned without coping anything .
