Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

# Thread: java code for fibonacci series?

1. ## java code for fibonacci series?

i am new to java..

can someone help me with a program that displays fibonacci series ..when limit is mentioned ?

2. ## Re: java code for fibonacci series?

Yeah we can, but first you need to show us what you've done so far and what problems you're having.

3. ## Re: java code for fibonacci series?

Is this the same problem that you posted on another forum?
some code explanation please?
Please provide a link to the other forum so people here can see what has been answered already for this question.

4. ## The Following User Says Thank You to Norm For This Useful Post:

newbie (December 31st, 2011)

5. ## Re: java code for fibonacci series?

this is fibonacci.. the other was factorial..lol ..infact i have a total of 18 problems to solve and study..i was wondering where i could ask about all these..

import java.io.*;
class fibonacci
{
int first,second,third,lim;
string n1;

System.out.println("\n enter the limit");

lim = Integer.parseInt(n1);

first=0;
second =1;

for (int i = 1; i<=lim; i++)
{

System.out.println(first);

third=first +second;
first = second;
second= third;

}
}
}

6. ## Re: java code for fibonacci series?

Can you post the program's output and explain what is wrong with it?

7. ## Re: java code for fibonacci series?

thats not what i am worried about.. i cant make sense of the logics behind these.. all i could do is byheart these codes for the exam.. speaking about these helps me a bit...

i have a palindrome problem.. a problem to find the area of a circle using interface... i dont even know what an interface is..

is it ok to post the rest of the problems here ?
i might be able to correct atleast syntax errors by having a little discussion about it

8. ## Re: java code for fibonacci series?

Work on one problem at a time.
What happens when you compile and execute the code you posted in post#4?