Here you can find the source of getFibonacci(int number)
public static int getFibonacci(int number)
//package com.java2s; //License from project: Open Source License public class Main { public static int getFibonacci(int number) { if (number == 0 || number == 1) { return number; } else {// w w w . ja v a 2 s. c o m return number = getFibonacci(number - 1) + getFibonacci(number - 2); } } }