public static int[] fibonacciArray(int n) {int[] array = new int[n];
}
public static void main(String[] args) {int n = 10;int[] fibonacci = fibonacciArray(n);
public static int[] fibonacciArray(int n) {
array[0] = 0;int[] array = new int[n];
array[1] = 1;
for (int i = 2; i < n; i++) {
array[i] = array[i - 1] + array[i - 2];
}
return array;
}
public static void main(String[] args) {
for (int num : fibonacci) {int n = 10;
int[] fibonacci = fibonacciArray(n);
System.out.print(num + " ");
}
}