The code just prints out 0 instead of the number I had just typed...It's not an issue with the scanner as I inserted a println in the promptForTrialNumber method after the in.nextInt() and before the return statement and that returned the value typed.

Note that Java is passes parameters by value always, so that passing your variable into the method won't work since it's a primitive variable. Even if it did work, it's a bad habit to get into since you'll be changing state by side effect rather than by assignment, making your code much harder to debug.