I'm going to answer your question with a bunch of questions which will hopefully lead you down the path to enlightenment, or at least give you some
fruit for further research.
It is 4 because the value '4' got assigned into the array at index 0.
Why would it not be 4?
What other value do you think it might have been? Why?
This question is
testing the rules around parameters passed to methods.
Java is strictly pass by value.
This means that any changes to the value of a parameter in a method, it is not reflected in the calling code.
Does editing the
contents of an array qualify as changing the value of "array"?
What sort of operation WOULD change the value of "array"?