I was glancing through this function getLocationOnScreen()
void getLocationOnScreen (int[] outLocation)
Computes the coordinates of this view on the screen. The argument must be an array of two integers. After the method returns, the array contains the x and y location in that order.
What I don't understand here is that if I am passing an array something like this,
int position[] = new int[2];
view.getLocationOnScreen(position);
The function being return type being void
how does my array contains those values without the function returning it ?
Note: This question is not a duplicate of the below as it explains the working of the 2 methods.