We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
which is from the contents page for the "Beginning Java" forum. We usually delete such direct answers, but yours is quite vague, so I shall keep it here.
Joined: Oct 13, 2005
sal lazar, welcome to the Ranch
Always tell us where the exercise is from; is that example from Head First Java™? Which page? Please be consistent with indentation and use spaces, not tabs, for indenting.
I think you will have to do it the hard way, with a pencil and paper., writing down the values of x, count and counter at each iteration through the loop. alternatively, yo ucan add a line to the loop which prints out those values, something like:If you are using m4a[x].counter, that line would have to go after your line 9. You can work out similar lines for other parts of the program. Then you can follow the flow of control and the values used. then yo ucan see where the 9 and 5 and 1 come from.