Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What does the return type " <T> T" mean?

843793May 27 2010 — edited Jun 12 2010
Hi,

I've recently stumbled over a method in an interface I need to implement which looks like:
 <T> T methodName();
I've never seen such a strange return type, it would be great if somebody could take the patience and just explain short whats all this is about.
So ok the <T> is some generic universal type I guess, but whats about that single T after it?

Sorry for the dumb question.

Thank you in advance, Clemens
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2010
Added on May 27 2010
32 comments
10,996 views