i'll try to help you. :-) (i'm also preparing this exam).
On line 04, anotherMethod(ejg), prints 20, because, inside the method on line 18 there is a System.out.println(val).
When you call the method, you pass the variable ejg as parameter of the method, and so val has the value of ejg, 10.
This value get changed to 20 on the first line of the method (line 17).
Then the method prints this value on line 18. Then compiler go back to line 05 and prints the value of ejg, which has not
been changed and it's still 10.