Write a program to print fibonnaci sereis in java
first approach with array
take array of it with limit till where you want to display the fibonacci series.
 
 
assign the array index of 0 to 0 and 1 to 1
 
 
 
 
 
start the loop for the rest of the index assignment
so start the loop from 2 because 0 and 1th index are already occupied
 
 
 
 
 
then the main logic
 
 
 
 
 
 
 
 
 
 
now its time to display
 
 
 
 
 
 
 
 
 
 
and hit the run
 
 
 
 
something wen wrong
 
 
 
 
 
 
 
the problem is i+2 which gives array index out of bound , change it to i-2
 
now hit run
 
 
and you can see the output .
 
 
 
 
 
 
now the second approach
the most common way to do the progarm of fibonacci
 
 
 
 
 
 
 
 
 
 
 
thanks for watching guys
kindly subscribe
and if you have any query or logic problem kindly give me a comment
 
 
