Size of Enumeration<String>
The Enumeration
interface does not expose its size, and some (many?) implementations indeed do not have this knowledge. Without any knowledge of the specific implementation, you have no choice but to iterate over it.
The Enumeration
interface does not expose its size, and some (many?) implementations indeed do not have this knowledge. Without any knowledge of the specific implementation, you have no choice but to iterate over it.