Java tutorial
import java.util.Arrays; public class Main { public static void main(String[] args) { // initializing Object array Object arr[] = new Object[] { 1.5, 5.6, 4.5, 2.3, 6.7 }; System.out.println(Arrays.toString(arr)); // using fill for placing 12.2 Arrays.fill(arr, 12.2); System.out.println(Arrays.toString(arr)); } }