on page# 618 K&B
By saying <? extends Animal>, we're saying, I can be assigned a collection that is a subtype of List and typed for <Animal> or anything that extends Animal.
SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Sage of The Monstrous Toad of Mount Myoboku
SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Sage of The Monstrous Toad of Mount Myoboku
Ankur kothari wrote:dude i think in the first code...add will give a compile error
SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
can anyone explain me the above and difference between <? extends Animal> and <? super Animal>
Ankur kothari wrote:hey i didnt know that we cant get thing when we use super....
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankur kothari wrote:ankit did you mean List<? super Number> ???
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Edwin Dalorzo wrote:Do you get it now?
SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Sage of The Monstrous Toad of Mount Myoboku
SCJP 1.6 96%
Edwin Dalorzo wrote:
How about this time, did you get it?
SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
SCJP 1.6 96%
SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |