package shuzu; import java.util.Arrays; public class TH { public static void main(String[] args) { // TODO Auto-generated method stub String arr[] = {"qq","ww","ee"}; for(String x : arr) { System.out.println("替换前数组arr中元素有:"+x); } Arrays.fill(arr,2,3,"bb"); for(String x : arr) { System.out.println("替换前数组arr中元素有:"+x); } } }