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