ArrayList<Color> palette = new ArrayList<Color>();
ArrayElement is simple than array list.
double[] values = new double[10]; double[] moreValues = { 32, 54, 67.5, 29, 35} double firstValue = values[0]; values[0] = 42;
list
for (int i = 0; i < values.length; i++) { System.out.println(values[i]); } for (double value: values) { System.out.println(value); }
array declare
int[] primes = { 2, 3, 5, 7, 11 };
int[] primes = { 2, 3, 5, 7, 11 }; for (int i = 0; i < 2; i++) { primes[4 - i] = primes[i]; }
values[0] = 10; values[values.length - 1] = 10;