Collection interface
1 posts in topic
Flat View  Flat View

Posted By:   gorantala_usha
Posted On:   Tuesday, May 10, 2005 02:40 AM

the methods remove(Object o), removeAll(), retainAll() of Collection interface are said to be optional operations. if a class implements this interface, it should implement all its methods. so, what is meant by "optional operations"? how can the implementor be allowed not to implement these 3 methods?

Re: Collection interface

Posted By:   WarnerJan_Veldhuis  
Posted On:   Tuesday, May 10, 2005 04:13 AM

If you would create some sort of list that contains items that cannot be removed, you implement the method signature, but you leave the implementation empty...
About | Sitemap | Contact