第一个class
package e1;
public class feiq {
public static void main(String[] args) {
fei fei2 = new fei(5);
fei2.printffei();
}
}
第二个class
package e1;
public class fei {
int data[];
public fei(int length){
data = new int[length];
data[0] = 1;
data[1] = 1;
for(int i=2;i<data.length;i++)
{
data[i] = data[i-1]+data[i-2];
}
}
public void printffei(){
for(int i=0;i<data.length;i++)
{
System.out.println(data[i]);
}
}
}