Home » Java Collections emptyEnumeration() Method with Examples

Java Collections emptyEnumeration() Method with Examples

by Online Tutorials Library

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.  

You may also like