I'm also a java beginner, and on the same boat as you Darrin,
just stuck on the same exercise and after an hour trying write some code myself that didn't work, found this forum and read some other sources also.
So this is what I came up with, don't know if it is the right way, but it's working.
actually it is not the complete program from the exercise, it should check first if the integer (n) entered from the user is positive.
and also I think there is another approach to this exercise:
the problem is when enter a negative value, my positive value checker is not complete
I think this was a new question, albeit related to the topic of this thread, so I split it off.
Do you mean you have a precondition in that method that it must be passed a positive number as its argument? In that case, enforce the precondition: look at this constructor as an example. And this fictitious method: