Why Collection doesn’t extend Cloneable and Serializable interfaces ?
3 years ago
OOP Java
The Collection interface specifies groups of objects known as elements. Each concrete implementation of a Collection can choose its own way of how to maintain and order its elements. Some collections allow duplicate keys, while some other collections don’t. The semantics and the implications of either cloning or serialization come into play when dealing with actual implementations. Thus, the concrete implementations of collections should decide how they can be cloned or serialized.

Surya Bikram Bhandari
Oct 31, 2021