# Fibonacci series with java code ## INTRODUCTION :-

Hello friends, how are you all once again I welcome you all to my website Technology Inspire(how to print a series in Fibonacci type using java code).

In this article we are going to talk about how with the help of Java program we can print any number in Fibonacci series? What type of code should we use in java programming so that our number is printed in Fibonacci series.

we will know what is Fibonacci Serious and how with the help of Java program we can print numbers in Fibonacci series.

## FIBONACCI SERIES

In Fibonacci series, next number is the sum of previous two numbers for example 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 , 89 , 144 etc. The first two numbers of Fibonacci series are 0 and 1 (how to print a series in Fibonacci type using java code.)

### Flow chart of Fibonacci Series

After seeing this flow diagram, all of you must have got a good idea about Fibonacci series.

### Program

Print numbers in Fibonacci series java coding(how to print a series in Fibonacci type using java code.)

``````class Fibonacciseries{
public static void main(String args[]){
int n1=0,n2=1,n3,i,count=10;
System.out.print(n1+" "+n2);
//printing 0 and 1

for(i=2;i<count;++i)
//loop starts from 2 because 0 and 1 are already printed
{
n3=n1+n2;
System.out.print(" "+n3);
n1=n2;
n2=n3;
}

}

}  ``````

OUTPUT :-

``0 1 1 2 3 5 8 13 21 34``

If there is anything in this article that you have not understood, then with the help of my YouTube channel (Technology Inspire ) you will understand easily . click on the YouTube video below (how to print a series in Fibonacci type using java code ).

If you found anything helpful in this video or article , then do like , share and Subscribe my YouTube channel and this page (how to print a series in Fibonacci type using java code) .

## NOTE :-

I hope that in today’s article you all know well how to print a series in Fibonacci type using java code?

Thank you all for reading this article till the end . If any one of you feel that some changes are need in this article or if you all want an article on some other topic , then definitely tell in the comment box so that very soon I will give another update on that article or that doubt . I can clear (how to print a series in Fibonacci type using java code) .

So that’s all for today , with another new update in next article , good bye till then!