@@ -0,0 +1,1333 @@
+%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0A%0A%0Apublic class Arraylist %7B%0A%09%0A%09public static void main(String%5B%5D args)%7B%0A%09%09%0A%09%09int sum = 0;%0A%09%09%0A%09%09// declares and initializes ArrayList with 100 random integer values%0A%09%09ArrayList%3CInteger%3E aList = new ArrayList%3C%3E();%0A%09%0A%09%09for (int i = 1; i %3C= 100; i++)%7B%0A%09%09%09aList.add((int) Math.floor(Math.random()*101));%0A%09%09%7D%0A%09%09%0A%09%09// prints out values in aList%0A%09%09System.out.println(%22Random ArrayList: %22 + aList);%0A%09%09%0A%09%09// sums all even numbers in aList%0A%09%09for (int i = 0; i %3C aList.size(); i++)%7B%0A%09%09%09if ( (aList.get(i) %25 2) == 0 )%7B%0A%09%09%09%09int temp = aList.get(i);%09%09%09%09%0A%09%09%09%09sum += temp;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09System.out.println(%22Here is the sum of aList: %22 + sum);%0A%0A%09%09// removes odd elements in aList & adds them back to the end of list%0A%09%09int j = 0;%0A%09%09int size = aList.size();%0A%09%09int oddCounter = 0;%0A%09%09%0A%09%09while ( j %3C size-oddCounter )%7B%0A%09%09%09if ( (aList.get(j) %25 2) != 0 )%7B%0A%09%09%09%09int temp = aList.get(j);%0A%0A%09%09%09%09aList.remove(j);%0A%09%09%09%09aList.add(temp);%0A%09%09%09%09oddCounter++;%0A%09%09%09%7D%0A%09%09%09%09%0A%09%09%09else%7B%0A%09%09%09%09j++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09System.out.println(%22Odd elements are now in order: %22 + aList);%0A%09%09%0A%09%09// creates Array of integers out of new aList & prints out values%0A%09%09Integer%5B%5D arr = new Integer%5BaList.size()%5D;%0A%09%09%0A%09%09for (int i = 0; i %3C aList.size(); i++)%7B%0A%09%09%09arr%5Bi%5D = aList.get(i);%0A%09%09%7D%0A%09%09System.out.println(%22Array: %22 + Arrays.toString(arr));%0A%09%09%0A%0A%0A%0A%09%7D%0A%09%0A%7D%0A

Create Arraylist.java