Originally posted by preeti khane:
Which of these statements concerning the collection interfaces are true?
1) Set extends Collection.
2) All methods defined in Set are also defined in Collection.
3) List extends Collection.
4) All methods defined in List are also defined in Collection.
5) Map extends Collection.
Answer is 1,2,3
I thought it was 1,2
I mean if Set extends then how can evrything in Set be defined in Collecion
I think, you meant you thought 1 and 3 were correct.
As for Set, it contains no methods of its own, all its methods are inherited from Collection, hence 2 is correct.
HTH,
- Manish