posted 19 years ago
Hi, all,
When a method need return an object list as result, I notice that two implementations exist in JDK. Some take java.util.Enumeration as return type (java.sql.DriverManager.getDrivers), and some take arrays (java.awt.Container.getComponents) instead. Of cource, other choices also there, for example, java.util.Iterator, etc. But, here, my question is on Enumeration and array: I wonder whether there's any resonable consideration when determining which is the appropriate return type?
Any advice will be appreciated.
Stephen Suen