Day: June 26, 2021

In Java, you use the enumeration type to represent a list of predefined constants. But, what if you want to implement a Set interface with the enumeration type, you have got EnumSet in Java to do so. Enum constants are unique and have predefined length, as you can not define a new enum constant at […]Continue reading

There are read-only wrappers over collections which are known as unmodifiable lists. These lists do not support any modification operations such as add, remove, and clear. Hence, these kinds of lists which guarantee that no change in the Collection object will ever be visible are termed as immutablelist. The Java Collections framework provides the unmodifiableList() […]Continue reading