Collection interface The collection interface is the foundation upon which the collection framework is built. It declares the core methods that all collections will have. A class cast exception is generated when are objects is incompatible with another, Such as when an attempt is made to add an incompatible object to a collection. The following…