Studyon Minte9.com
Java SE




Populate




package testexample; import java.util.*; public class Testexample { public static void main(String[] args) { int[] nums = new int[10]; Arrays.fill(nums, 2); // --- Look Here --- // System.out.println(Arrays.toString(nums)); // Outputs: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] String[] ss = new String[] {"One", "Two", "Three"}; // or {"One", "Two", "Three"}; System.out.println(ss[0]); // Outputs: One } }
 


http://stackoverflow.com/questions/5252653/java-arrays-fill
http://stackoverflow.com/questions/576855/how-do-i-fill-arrays-in-java