class Fib { /* Computes the nth fibonacci number according to definition. */ static long fib(int n) { if (n < 2) return n; return fib(n-1) + fib(n-2); } public static void main(String[] args) { int n = 100; System.out.printf("fib(%d) = %d%n", n, fib(n)); } }