
import java.util.Arrays;

public class Fill
{
   public static void main(String[] args)
   {
      int[] list = new int[10];

      Arrays.fill(list, 4); // Fill whole array with the value 4

      Arrays.fill(list, 2 , 5 , 7); // Fill list[2-4] with the value 7
   }
}
