| Author |
Mock Exam Question
|
Asha Pathik
Ranch Hand
Joined: Feb 08, 2006
Posts: 143
|
|
hi, In the above code the answers are given as " a, d and e". I understood the reson for option a and d but I'm not able to get why option e is correct. Could someone plz explain me that? Thanks
|
SCJP 1.5
|
 |
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
|
|
|
That is the purpose of the generic declaration TreeSet<test>. You specify that the TreeSet is going to hold test objects.
|
 |
Asha Pathik
Ranch Hand
Joined: Feb 08, 2006
Posts: 143
|
|
Oh! ... got it. It was a general question about generics. I was mixing it with program behaviour. Thanks Keith Asha
|
 |
Dave Tan
Greenhorn
Joined: Jun 26, 2006
Posts: 5
|
|
|
Is the use of the Comparator interface allowed? As far as i know, only interface Comparable can be used.
|
 |
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
|
|
|
Do you mean in general or with generics?
|
 |
Asha Pathik
Ranch Hand
Joined: Feb 08, 2006
Posts: 143
|
|
I meant the other options were related to the program behaviour whereas the last option was about the correct meaning of the "generic collection declaration", nothing related to program behaviour. Asha
|
 |
 |
|
|
subject: Mock Exam Question
|
|
|