aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr351592/Fib.java
blob: 569ca46af991cc4aafea76be41afac46e61fdbc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package caching;

public class Fib {
	public static int calc(int n){
		if (n < 2) return 1;
		return calc(n-1) + calc(n-2);
	}
	public static Integer calc2(Integer n){
		if (n < 2) return 1;
		return calc2(n-1) + calc2(n-2);
	}
}