21.2. Fibonacci Example: Execution

Procedure 21.1. Task

  1. Launch the Eclipse IED.
  2. Open the class org.drools.examples.fibonacci.FibonacciExample.
  3. Right-click the class and select Run as... and then Java application.
Result

Eclipse shows the following output in its console window (with "...snip..." indicating lines that were removed to save space):

recurse for 50
recurse for 49
recurse for 48
recurse for 47
...snip...
recurse for 5
recurse for 4
recurse for 3
recurse for 2
1 == 1
2 == 1
3 == 2
4 == 3
5 == 5
6 == 8
...snip...
47 == 2971215073
48 == 4807526976
49 == 7778742049
50 == 12586269025