Answer is 4 15:15
1. p=3,4,5
2. q=3,7,5
when we have the statement long[]Q=method(P)
It will call method function and p is passed as parameter and in method function we are changing r[1]=7.
Actually arrays are passed as reference. So whatever changes you make in r, it actually gets reflected in p. Hence both the arrays will display sum=3+7+5=15