wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K & B Generics Self Test Q16 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K & B Generics Self Test Q16" Watch "K & B Generics Self Test Q16" New topic
Author

K & B Generics Self Test Q16

palla sridhar
Ranch Hand

Joined: Oct 15, 2007
Posts: 111
When i try to compile the following code, i get a COMPILER ERROR.



The answers given are:


Can anyone explain why these answers give a COMPILER ERROR still ??. My doubt is how can List<Integer> or List<Number> be assigned a List<? super Integer> or List<? super Number>.....


Thanks and Regards,
[url]www.techlikes.com[/url]
*Nothing is CONSTANT in life, except CHANGE*
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
See K&B errata, the correct signature is:
palla sridhar
Ranch Hand

Joined: Oct 15, 2007
Posts: 111
Thank you Ahmed, for showing the Error and also let me know abt the Errata..
Can you tell me the link where i can get proper ERRATA for K&B. In javaranch, its not so clear..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: K & B Generics Self Test Q16
 
Similar Threads
doubt in generics example from kathy sierra
Study guide 5 Self Test error
[SCJP] Generics questions form SCJP 5 study Guide
Doubt in Generics
doubt abt Generics mock question - from K&B