If you have a question or issue you need to actually TELL US WHAT IT IS!
Just saying you have a problem is useless. You didn't post any error or exception. And don't just tell us what it is; post a copy of the EXACT exception that you are getting and, if it refers to a line number, tell us which line of code it is.
sorry for that this is the error i getting for that code
error: cannot find symbol line 34
fib = fib(k+1);
symbol: method fib(int)
location: class FibN
Hmm - well you declared 'fib' like this:
long fib = 1;
So how do you expect to call a 'long' as if it were a function?