java/src/main/java/webservice/fibonacci/FibonacciService.java
<filename>java/src/main/java/webservice/fibonacci/FibonacciService.java<gh_stars>0package webservice.fibonacci;

public class FibonacciService {

    public FibonacciView fibonacci(long number) {
        return new FibonacciView(number, fib(number));
    }

    private long fib(long number) {
        if (number <= 1)
            return number;
        return fib(number - 1) + fib(number - 2);
    }
}

