 
import " java.io " package
 
 
Create a class, And save by it's " ClassName.java
 
 
 
 
Create a " mainFunction " from where program will start the execution.
 
 
 
This line is used for taking input and read that input which is entering from user .
 
 
 
 
 
 
Here we taking input from user .
 
Create one variable where entered value will be store .
" Integer.parseInt " should be used to convert input ' data type ' from " String to Integer " .
 
 
 
And " br.readLine() " is used to read the input .
 
 
 
 
 
 
Create 3 variable and initiate first variable to 0 , second variable to 1 and third variable to 0
 
 
 
 
 
Create "for loop" and type as shown above video
 
Type "c=a+b" and then "a=b" and "b=c" then they will change their value and generate Fibonacci number
 
 
 
And then print the value of c
 
Type after main function  " throws IOException " or " throws Exception " ( both are same ).
 
 
Save the program
Compile the program by using " javac ClassName.java "
 
 
 
 
 
 
 
 
After compilation process type the " java ClassName " to run your program.
Enter the input . It will show the answer.
 
 
 
 
