Im playing around with the clone method of arraylist and have a few questions. This is what i did with it:
ObjectMaker item1 = new ObjectMaker();
ObjectMaker item2 = new ObjectMaker();
ObjectMaker item3 = new ObjectMaker();
ArrayList<ObjectMaker> arrayList = new ArrayList<ObjectMaker>();
arrayList.add(item1);
arrayList.add(item2);
arrayList.add(item3);
Object theList = arrayList.clone();
I was suprised that clone return an object. I dont see the point since you cant use your methods on it since its of the class Object.
Also I cant seem to do anything with theList object. I am trying to get/use arraylist but its not working:
ArrayList<ObjectMaker> arrayList2 = theList.arrayList;