Tim Driven Development | Test until the fear goes away
Tim Driven Development | Test until the fear goes away
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Tim Driven Development | Test until the fear goes away
So effectively, method10 has to be first evaluated. Now comparing this to your recursive function, the innermost loop which is satisfied until your i is less than n, that method returns a value (in your case nothing as you are just printing the value of n) and then the next method up in the stack gets evaluated until it reaches the top of the stack which is method1 in our analogy!
Pawel Pawlowicz wrote:
So we have:
stack: x(2) x(3)* (* means method that already started resolving and put one child on stack)
output: 3 (I'll skip spaces)
Kasun Wixkramanayake wrote:Pawel Pawlowicz i follow your steps i can understand it but i have no idea how to write the rest of it.Please can you help me