udated class CollectionDemo in the package collectionframework