/* public static void main(String args[]){
int num=100 ;
int arr[] = new int[num];
arr[0]=0;
arr[1]=1;
for(int n=2;n<=num;n++){
arr[n]=arr[n-1]+arr[n-2];
}
for(int n=0;n<arr.length;n++){
System.out.print(arr[num]);
}
System.out.println();
}
*/
提示
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 100
at javajichu.digui.main(digui.java:12)
|