Fibonacci Series in Java
Fibonacci series is a series of numbers written in such a way that each number (leaving first two numbers 0, 1) is generated from the sum of previous two numbers. Ex: 0, 1, 1, 2, 3, 5, 8, 13, 21 Method 1: Simple but not optimal Method 2: Optimal References: Wiki Page – Fibonacci Number