When and why use Enumeration?

When is it useful to work with a Java class Enumerationand why is it useful to work with it?

+4
source share
1 answer

Enumerationpretty much out of date. In Javadoc, it is an interface that generates a series of elements one at a time. Successive method calls nextElementreturn successive elements of the series. This is the predecessor Iteratorwhich (for Javadoc)

Iteratorreplaces the EnumerationJava collection structure.

+7
source

Source: https://habr.com/ru/post/1607338/


All Articles