What is the exact difference between lagacy classes and collection classes? and Enumeration is possible on Collection classes?
Legacy class means synchronization .It an concept to the collection of framework.Synchronized classes gives an concept of thread based. Legacy classes are something like older versions when compared to new ones and that are now harder to maintain. If so many request is coming to access a single resources then it will lock all request and will do process one by one with sequence order. Legacy classes are classes which exist to provide forwards compatibility to existing programs but for which there are better alternatives.
Collections class provide a mechanism for working with objects stored in containers and include standard ways for accessing and iterating through objects in a collection. The most commonly used collection types are List and Map. Concrete implementations of List include ArrayList and Vector, which are variable size lists ideal for building, storing and manipulating a list of elements of any type of object. The Collection class functions as a true container class, even though it does not include the AddObject method like the Form and PageFrame classes.
Yes, Enumeration is possible on Collection classes by calling the function java.util.Collections.enumeration(Collection)