Which of the following statements is true regarding Vectors with no specified base type?
- AA base type is needed, because Java needs to know how to allocate memory.
- BNo base type is needed, because Java will use the Object class as a base type.
- CIf a base type is not specified the code will not compile.
- DNo base type is needed because Vectors default to storing String objects.
A raw Vector stores elements as Object references.
Map interface is derived from the Collection interface.
- ATrue
- BFalse
Map is a separate interface hierarchy and does not extend Collection.
A collection can store..........
- AHomogenous objects
- BHeterogeneous objects
- CObjects as well as primitive values
- DAt most 100 objects
Collections hold Object references, so objects of different types can be stored together.
HahMap takes key as a/an _________
- AObject
- BArray
- CPrimitive value
- DFunction
HashMap keys are objects.
The collections API are defined in ______ package?
- AJava.io
- BJava.util
- CJava.sql
- DJava.awt
The collection classes such as ArrayList and HashMap are in java.util.
If no base type is specified in a Vector, Java will use:
- AString class
- BInteger class
- CObject class
- DDouble class
A raw Vector stores elements as Object.