File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collections" Watch "Collections" New topic


Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 116
Hi Everybody

What does the letter E in Interface Collection<E>mean..And also what does the letter T in Comparator<T> mean.Like wise what do K,V mean in Map<K,V>.Do they have any special meaning or reference.

Thanks in advance
with regards
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Do you understand about generics, and are just asking if the letters themselves mean anything, or do you not know what the whole angle-bracket notation is about in the first place?

If it's the former, I'd guess that E is for element, K and V are for key and [/i]value, and T is for type. But they're arbitrary -- could be any letter.

If you don't know what the angle brackets mean, they are part of something new in Java 5 called generics. is one place you might start to learn about this.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Collections
It's not a secret anymore!