aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Mock Exam Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Mock Exam Question" Watch "Mock Exam Question" New topic
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: 2367
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: 2367
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock Exam Question