Could you include the import statements so the code will compile?
Also I don't see a main() method for testing the code.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
The recursive call on line 84 is ringing an alarm bell, but the variables names are so totally useless (what's m supposed to be?) that I can't tell any more than that.
JamesCherrill
... trying to help
8,667 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,476
Skill Endorsements: 33
what method is invoked several times? how can we answer this if we don't get to see the code where the method (might be/)is called?
stultuske
Industrious Poster
4,489 posts since Jan 2007
Reputation Points: 1,377
Solved Threads: 627
Skill Endorsements: 25
Which loop is the break on line 85 intended to exit? Without comments or useful variable names your code is more or less incomprehensible, but at at guess its trying to print one page then recurse to print the next?
Because you are only breaking out of the inner loop maybe the outer loop is continuing to print pages while the recursive call is also printing them, thus giving you more and more copies of the later pages?
JamesCherrill
... trying to help
8,667 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,476
Skill Endorsements: 33
Can you post code for testing? The posted code does not have a main() method.
Something small that will compile, execute and show the problem.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16