Java Arrays fill方法-填充double Java Arrays fill方法-使用索引填充char Java Arrays fill方法-使用索引填充double Java Arrays fill方法-填充double package com.codingdict; import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { // initializing double array double arr[] = new double[] {1.2, 5.6, 3.4, 2.9, 9.7}; // let us print the values System.out.println("Actual values: "); for (double value : arr) { System.out.println("Value = " + value); } // using fill for placing 12.2 Arrays.fill(arr, 12.2); // let us print the values System.out.println("New values after using fill() method: "); for (double value : arr) { System.out.println("Value = " + value); } } } Java Arrays fill方法-使用索引填充char Java Arrays fill方法-使用索引填充double