Here is my coding: For some reason, at the very end, when I\'m trying to return winscounter and losscounter, it says unreachable statement but not for the tiescounter. I can
You cannot return 3 different variables from one method, all at the same time. In this case, the return(tiescounter);
always executes, terminating the method then and there. Hence the next 2 lines become unreachable.
Declare determineOutcome()
method as void i.e. public static void determineOutcome()
, and remove all return statements inside it. Your program will work.