This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Generics Whizlabs" Watch "Generics Whizlabs" New topic
Author

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
    
    1

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
 
 
subject: Generics Whizlabs
 
It's not a secret anymore!