Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generic Method Declaration

 
Clay Chow
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Would it ever be possible to see a generic method declartion that looks like K<K>. I have tried and not been able to get one to compile. For example:



Also, I do not fully understand why this will not compile.

 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"K<K>"

That looks very peculiar. List<K> would look more likely.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic