public class ArrayTest {
public static void main(String[] args) {
int[] a = new int[]{1,2,4,3,5};
int[] b = {10,8,6,7,9};
int[] c = new int[a.length+b.length];
System.arraycopy(a, 0, c, 0, a.length);
System.arraycopy(b, 0, c, a.length, b.length);
Arrays.sort(c);
for (int i = 0; i < c.length; i++) {
System.out.println("c["+i+"]="+c[i]);
}
}
}