Fixed collapseDuplicates, should work now. Created new arrayListMethods.java