So I've been trying to figure this out, I know that CodeGym actually provided a material into this, but I just forgot to save it, and can't seem to find it within a reasonable time. So my question is: Why is this possible?
public class Main {
    public static void main(String[] args) {
        int something [] = {0, 1, 2, 3};
        changeArray(something);
        for(int i : something)
            System.out.println(i);
    }

    static void changeArray(int[] array){
        array[1] = 99;
    }
}
But not this?
public class Main {
    public static void main(String[] args) {
        int something = 1;
        change(something);
        System.out.println(something);
    }

    static void change(int someInteger){
        someInteger = 99;
    }
}
Something about passing by value or by reference, which I still don't completely understand. I can understand why the second one is not possible, as it copies the value into parameter, but I don't get why it's possible with the first example, as it would seem (at least for me) that it's not too different from the second example, where the array gets passed by value instead of reference. Edit: If you remember which CodeGym page/article it was, I'd be very grateful if you can post it. Sorry if the terms I'm using are wrong.