This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Generics Whizlabs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Generics Whizlabs" Watch "Generics Whizlabs" New topic

Generics Whizlabs

Saibabaa Pragada
Ranch Hand

Joined: Oct 24, 2010
Posts: 162
This is Whizlabs questions. Could you please advice on the following comments ?
Joe carco
Ranch Hand

Joined: Apr 14, 2009
Posts: 82
what is it you want to know? what exactly is your question??
Prasad Kharkar
Ranch Hand

Joined: Mar 07, 2010
Posts: 446

Saibabaa Pragada wrote:

above method argument means that we can pass any list that extends String but we cannot add elements to it

Saibabaa Pragada wrote:

and above method means that we can pass list of anything that is super type of String and we can ADD either String
or subype of String
(subtype of String is not possible as it is final class)

this may be a little difficult to understand so consider following example

hope this helps

SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right
It is sorta covered in the JavaRanch Style Guide.
subject: Generics Whizlabs
jQuery in Action, 3rd edition