public class FinoIteratorTest {
private int count;public FinoIteratorTest() {
}
public FinoIteratorTest(int a) {
this.count = a; }public Integer next() {
return dir(count++); }private int dir(int i) {
if (i < 2) return 1; return dir(i - 1) + dir(i - 2); }/**
* @param args */ public static void main(String[] args) { FinoIteratorTest finoIteratorTest = new FinoIteratorTest(); for (int i = 0; i < 5; i++) { System.out.println(finoIteratorTest.next()); } }}