There is no reason for giving type mismatch, while you are adding two int array into another int array. It should work:
for(int k = 0; k < 20; k++){
EndTime[k] = StarTime[k] + duration[k];
}
Ensure that exp.sample() is really casting into int. Also ensure the arrays are of same type.
1
solved Build an array from existing arrays?