import java.util.*;
public class ImoocStudent {
public static void main(String args[]){
int array[] = new int[6];
Arrays.fill(array,100);
for (int i = 0,n = array.length;i < n;i++){
System.out.println(array[i]);
}
System.out.println("------");
Arrays.fill(array,3,6,40);// 3到6位置扩充40
for(int i = 0,n = array.length;i < n;i++){
System.out.println(array[i]);
}
}
}
标签:java,Arrays,System,int,array,fill
From: https://www.cnblogs.com/pansidong/p/17431136.html