Javatpoint Logo
Javatpoint Logo

Java Collections emptyEnumeration() Method

The emptyEnumeration() method of Java Collections class is used to get an enumeration that has no elements.

Syntax

Following is the declaration of emptyEnumeration() method:

Parameter

This method does not accept any parameter.

Returns

The emptyEnumeration() method returns an empty enumeration.

Exceptions

NA

Compatibility Version

Java 1.7 and above

Example 1

Test it Now

Output:

Output: false

Example 2

Test it Now

Output:

Enumeration list is empty.

Example 3

Test it Now

Output:

It is empty Enumeration list.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA