【发布时间】:2013-01-23 16:15:30
【问题描述】:
我正在 Eclipse 中编写斐波那契数列,这是我的代码-
public class FibonacciAlgorithm {
private int a = 0;
private int b = 1;
public FibonacciAlgorithm() {
}
public int increment() {
int temp = b;
b = a + b;
a = temp;
return value;
}
public int getValue() {
return b;
}
}
它在return value; 行中显示错误value cannot be resolved to a variable。我没有看到任何其他错误。
【问题讨论】: