File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Generic doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Generic doubts" Watch "Generic doubts" New topic

Generic doubts

wong sheena

Joined: Apr 07, 2007
Posts: 23

The explanation is given as from k&B:
C is wrong because the return type evaluates to List<Integer>, and that can't
be assigned to a variable of type List<Number>.

how do we evaluate the type to be <Integer> as explained by the book??
and how come the option C is wrong. (Note other option are removed.)

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707

Did you see K&B errata:

K&B Errata


Sergio Tridente
Ranch Hand

Joined: Mar 22, 2007
Posts: 329

Try the following:

[ July 05, 2007: Message edited by: Sergio Tridente ]

SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
It is sorta covered in the JavaRanch Style Guide.
subject: Generic doubts