You have to take in account that by assigning intervals[0] to int[] current, you are not actually creating a new object. So your field current points to same object as intervals[0]. So when you call res.add(current), you are actually adding the array stored in intervals[0] to the List and any changes made in the current field will also be done in the array added to the List (because it is the same object). And as far as the code tells, you are not doing any changes on the array in else block, that's maybe why no changes are visible :P. If you do not want the array changes to be reflected in the list, before adding the array to the list, create a new array object and initialize it for example this way:
int[] current = new int[intervals[0].length]
for(int i = 0; i < intervals[0].length; ++i)
current[i] = intervals[0][i]
For your second question, if you have your array initialized like this:
int[][] intervals = new int[size][];
for(int i = 0; i < size; ++i)
intervals[i] = new int[size2];
that means that you created a new array (new object) inside each cell of the array. Now. This code:
int[] current=intervals[0];
Makes your variable current to point on the same object as intervals[0] does. So when you call res.add(current); you add the object current is pointing to to the list. So any changes made on current, or intervals[0] will also be reflected in the object stored in the list because it is the same object. But when you then assign another object to the current, when you call current = interval; you are just saying, that current now points to same object as interval does. That does not change the attributes of the original object current was pointing to (intervals[0]), current will be just pointing to another object.