Populating ArrayList
问题 I am trying to populate an array list, however, my array list constantly equals 0, and never initializes, despite my declaring it over main(). This is my code. static ArrayList<Integer> array = new ArrayList<Integer>(10); //The parenthesis value changes the size of the array. static Random randomize = new Random(); //This means do not pass 100 elements. public static void main (String [] args) { int tally = 0; int randInt = 0; randInt = randomize.nextInt(100); //Now set the random value.