Say i have a ArrayList, which contain custom object.
I need to remove all elements of the list. I can use following two :-
arrayList.clear();
arrayList = new ArrayList<some type>();
I need to know which one is efficient ?
thank you
Say i have a ArrayList, which contain custom object.
I need to remove all elements of the list. I can use following two :-
arrayList.clear();
arrayList = new ArrayList<some type>();
I need to know which one is efficient ?
thank you