| Author |
Collection generics method types
|
Harikrishna Gorrepati
Ranch Hand
Joined: Sep 23, 2010
Posts: 422
|
|
|
Hi, How to call the following 3 methods in Collection generics. These look typical and hard to understand.
|
OCPJP 6.0-81% | Preparing for OCWCD
http://www.certpal.com/blogs/cert-articles | http://sites.google.com/site/mostlyjava/scwcd |
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3053
|
|
Where did you get these methods? I think the last one is illegal.
|
 |
Harikrishna Gorrepati
Ranch Hand
Joined: Sep 23, 2010
Posts: 422
|
|
|
Thanks Stephan. I am clear now. These are some samples that I got from net.
|
 |
Rohit Ramachandran
Ranch Hand
Joined: Oct 05, 2010
Posts: 102
|
|
|
Why is the third one illegal?
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3053
|
|
Hmmm I tried the third method, and it compiled just fine. I have no clue how to call it though. It looks like a circular reference, so I assumed the compiled wouldn't allow it.
If someone knows, please give an example.
|
 |
Wouter Oet
Saloon Keeper
Joined: Oct 25, 2008
Posts: 2700
|
|
The third one can be called like this:
|
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
|
 |
 |
|
|
subject: Collection generics method types
|
|
|