Added javadocs for the sorted array, added sorted arraylist, and 
corrected them.