# | Line 15 | Line 15 | package jsr166e; | |
---|---|---|
15 | * class Fibonacci extends RecursiveTask<Integer> { | |
16 | * final int n; | |
17 | * Fibonacci(int n) { this.n = n; } | |
18 | < | * Integer compute() { |
18 | > | * protected Integer compute() { |
19 | * if (n <= 1) | |
20 | * return n; | |
21 | * Fibonacci f1 = new Fibonacci(n - 1); | |
# | Line 46 | Line 46 | public abstract class RecursiveTask<V> e | |
46 | ||
47 | /** | |
48 | * The main computation performed by this task. | |
49 | + | * @return the result of the computation |
50 | */ | |
51 | protected abstract V compute(); | |
52 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |