Difference between the List and Enumeration
- by harigm
I have a written a method to get all the records and return in the List Type,
but I got out of memory error.
So I changed return type from List to Enumeration, in the method, instead of ArrayList, uses Vector and return vector.elements at the end of the method.
It works without any error. but I did not understand why.
Could someone explain Why this Enumeration worked?