Posted On: Apr 08, 2020
An immutable state indicates that once an item is designed, we may not be able to alter its element. Seldom it is important to create an immutable set as per the terms. ImmutableList, as implied by the title, is a kind of List that is changeless. It indicates that the content of the Program is established or unswerving after the declaration, which means, these are read-only. If any effort made to compute, delete and refresh components in the List, UnsupportedOperationException is discharged.
For instance, Character, Double, Boolean, Byte, Float, Long, Short, String, Integer and all fundamental wrapper groups are immutable classes.
Never Miss an Articles from us.