Author Topic:   Collections
shan
unregistered
posted February 19, 2000 07:42 PM           
which of the following are true

At the root of Collection hierarchy is the
class called Collection---true

The Collection Interface contains method enumerator--no

the iterator returns an instance of the class Vector--no
returns Iterator

The set interface is designed for unique elements--true

Tony Alicea
sheriff
posted February 20, 2000 07:44 AM             
Only error is:

Collection is an INTERFACE not a Class.

maha anna
bartender
posted February 20, 2000 11:45 AM             
My question is java.util.Map is also part of Collection . There is no connection bet the Collection interface and this . Then how can we generalize a stmt like this.
maha anna

Tony Alicea
sheriff
posted February 20, 2000 12:24 PM             
The new Collections framework includes the interface Collection and Map and their sub-interfaces and implementing classes. I know it's somewhat misleading but Map and Collection are independent hierarchically, but both part of the same new framework in Java 2.

|