Java Fibonacci Sequence Get getFibonacci(int number)

Here you can find the source of getFibonacci(int number)

Description

get Fibonacci

License

Open Source License

Declaration

public static int getFibonacci(int number) 

Method Source Code

//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);
        }
    }
}

Related

  1. fiboCercano(long numero)
  2. fibonacci(int n)
  3. fibonacci(int n)
  4. fibonacci(int n)
  5. fibonacci(long max)
  6. getFibonacciSeq(long f)
  7. getFibonnaci(long i)
  8. isFibonacci(long f)
  9. makeFibonacciSupplier()