File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Generic Method Declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Generic Method Declaration" Watch "Generic Method Declaration" New topic
Author

Generic Method Declaration

Clay Chow
Ranch Hand

Joined: Nov 09, 2008
Posts: 35
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

Joined: Oct 13, 2005
Posts: 36478
    
  16
"K<K>"

That looks very peculiar. List<K> would look more likely.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generic Method Declaration
 
Similar Threads
Doubt related to use of wild card character ( ? super E)
Generics question (Devaka Diagnostic Exam, Question 57)
Confused over generics
***Confusing Generic question ****
Help with Java Generics...