I tried converting it to array list and back using this
https://www.geeksforgeeks.org/conversion-of-array-to-arraylist-in-java/
but I'm getting a lot of error, I also tried this
How do I remove objects from an array in Java?
but it only works on strings for some reason, I did modify to make it for int but it's not working
int[] array = {1,2,3,4};
List<Integer> list = new ArrayList<Integer>(Arrays.asList(array));
list.removeAll(Arrays.asList(3));
array = list.toArray(array);
What I'm trying to do is this
// copy 2 elements in array1 to array2
// remove those 2 elements from array1 since I already used them