the more interesting part was the recursivity not being correct.
to give a very simple (basic) explanation:
a recursive method is a method that calls itself.
for instance:
public int addTo100(int number){
if ( number < 100 ){
number += 1;
number = addTo100(number);
}
return number;
}
the above is recursively adding to (at least) 100, since addTo100 calls itself.
sure it could be done with a for loop, but that would not be recursive.
stultuske
Industrious Poster
4,370 posts since Jan 2007
Reputation Points: 1,318
Solved Threads: 610
Skill Endorsements: 23