![]() |
![]() |
![]() |
![]() |
![]() |
|
Whenever a method, such as recursivePowerOfTwo, is used in its own
definition, the method is said to be recursive.
When a method makes use of itself, the method is said to recurse.
Given a positive, integer argument, there is no danger that
recursivePowerOfTwo will recurse foreversending an infinite
number of messagesbecause eventually the receiver is counted down to
0, which handles the recursivePowerOfTwo message directly,
without further recursion.