your statements will not work1: c = a;2: c[a.length + 1] = b;i guess in 2: you must be getting ArrayIndexOutOfBoundsExceptionfollowing will workbyte [] c= new byte[a.length+1];for(int i=0;i<a.length;i++) c[i]=a[i];c[a.length]=b;