• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection generics method types

 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, How to call the following 3 methods in Collection generics. These look typical and hard to understand.
 
Stephan van Hulst
Bartender
Pie
Posts: 5889
63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Where did you get these methods? I think the last one is illegal.
 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stephan. I am clear now. These are some samples that I got from net.
 
Rohit Ramachandran
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is the third one illegal?
 
Stephan van Hulst
Bartender
Pie
Posts: 5889
63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The third one can be called like this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic